Not all trauma is made equal

Exploring whether type, timing and interactions of traumatic events influence the development of PTSD symptoms in Rohingya

Elisa Ugarte

2024-5-27

Setup

Opening packages and data set

Sample Characteristics and centering/dummying

data <- data %>% mutate(across(c(htq1_04:htq1_39, ace_3_1:ace_7_3,ace_2_1R,ace_2_2R), ~ ifelse(. %in% c(88,99,100,89,777), NA, .))) %>% ungroup() %>% mutate_at(vars(c(htq1_04:htq1_39, ace_3_1:ace_7_3,ace_2_1R,ace_2_2R)),
funs(as.ordered(.)))

describe(data$q102b_guess_age)
## data$q102b_guess_age 
##        n  missing distinct     Info     Mean      Gmd      .05      .10 
##     2965        0       37    0.995     22.3    6.351       15       16 
##      .25      .50      .75      .90      .95 
##       18       21       26       30       33 
## 
## lowest : 12 13 14 15 16, highest: 44 46 47 48 66
describe.by(data$q102b_guess_age, group = data$respondent_cat)
## 
##  Descriptive statistics by group 
## group: 1
##    vars    n  mean   sd median trimmed  mad min max range skew kurtosis   se
## X1    1 2323 21.14 5.16     20   20.56 4.45  12  40    28 0.96     0.34 0.11
## ------------------------------------------------------------ 
## group: 2
##    vars   n  mean   sd median trimmed  mad min max range skew kurtosis   se
## X1    1 642 26.48 6.23     25   25.75 5.93  16  66    50 1.29     2.76 0.25
data %>% select(htq1_sum, ace_frequency, htq_ptsd_total) %>%
  describe_distribution()
## Variable       | Mean |   SD |  IQR |         Range | Skewness | Kurtosis |    n | n_Missing
## --------------------------------------------------------------------------------------------
## htq1_sum       | 6.75 | 3.86 | 5.00 | [0.00, 27.00] |     0.73 |     0.63 | 2965 |         0
## ace_frequency  | 4.39 | 2.04 | 3.00 | [0.00, 11.00] |     0.19 |    -0.50 | 2959 |         6
## htq_ptsd_total | 1.89 | 0.53 | 0.76 |  [1.00, 3.79] |     0.38 |    -0.45 | 2804 |       161
data <- data %>% mutate(respondent_cat = respondent_cat -1) %>% mutate(q102b_guess_age = q102b_guess_age - mean(q102b_guess_age))

HTQ Run CFAs model with all sample

5 factor solution

model_5fw <- "
ConflictTrauma =~ htq1_05 + htq1_06  + htq1_17 
Isolation_Loss =~ htq1_19 + htq1_21 + htq1_30_34
ViolentVictimization =~ htq1_7_10 + htq1_8_9 + htq1_11 + htq1_13_18 + htq1_14 + htq1_16 + htq1_20_24 + htq1_22  + htq1_25_to_29 + htq1_23 
Destruction_Injury =~ htq1_04 + htq1_12_36 +  htq1_15 + htq1_32 + htq1_35
WitnessViolence =~ htq1_39 + htq1_37 + htq1_38
htq1_04 ~~ htq1_15 
"
fit_mod5fw <- lavaan::cfa(model_5fw, data = data,  auto.fix.first = FALSE, std.lv = TRUE, ordered = T)
t5 <- fitMeasures(fit_mod5fw, fit.measures = c("npar", "fmin", "chisq", "df", "pvalue", "srmr", "cfi.scaled", "tli.scaled", "rmsea.scaled", "srmr_mplus"))
knitr::kable(t5, caption = "Model fit statistics 5", digits = 3)
Model fit statistics 5
x
npar 59.00000000
fmin 0.14739757
chisq 868.46647399
df 241.00000000
pvalue 0.00000000
srmr 0.07618437
cfi.scaled 0.96502237
tli.scaled 0.95994263
rmsea.scaled 0.03256266
srmr_mplus NA
summary(fit_mod5fw, fit.measures = TRUE, standardized = TRUE)
## lavaan 0.6.17 ended normally after 21 iterations
## 
##   Estimator                                       DWLS
##   Optimization method                           NLMINB
##   Number of model parameters                        59
## 
##                                                   Used       Total
##   Number of observations                          2946        2965
## 
## Model Test User Model:
##                                               Standard      Scaled
##   Test Statistic                               868.466     993.561
##   Degrees of freedom                               241         241
##   P-value (Chi-square)                           0.000       0.000
##   Scaling correction factor                                  0.917
##   Shift parameter                                           46.308
##     simple second-order correction                                
## 
## Model Test Baseline Model:
## 
##   Test statistic                             34668.630   21791.509
##   Degrees of freedom                               276         276
##   P-value                                        0.000       0.000
##   Scaling correction factor                                  1.599
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.982       0.965
##   Tucker-Lewis Index (TLI)                       0.979       0.960
##                                                                   
##   Robust Comparative Fit Index (CFI)                            NA
##   Robust Tucker-Lewis Index (TLI)                               NA
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.030       0.033
##   90 Percent confidence interval - lower         0.028       0.030
##   90 Percent confidence interval - upper         0.032       0.035
##   P-value H_0: RMSEA <= 0.050                    1.000       1.000
##   P-value H_0: RMSEA >= 0.080                    0.000       0.000
##                                                                   
##   Robust RMSEA                                                  NA
##   90 Percent confidence interval - lower                        NA
##   90 Percent confidence interval - upper                        NA
##   P-value H_0: Robust RMSEA <= 0.050                            NA
##   P-value H_0: Robust RMSEA >= 0.080                            NA
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.076       0.076
## 
## Parameter Estimates:
## 
##   Parameterization                               Delta
##   Standard errors                           Robust.sem
##   Information                                 Expected
##   Information saturated (h1) model        Unstructured
## 
## Latent Variables:
##                           Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   ConflictTrauma =~                                                            
##     htq1_05                  0.748    0.022   34.273    0.000    0.748    0.748
##     htq1_06                  0.904    0.025   36.610    0.000    0.904    0.904
##     htq1_17                  0.862    0.020   43.686    0.000    0.862    0.862
##   Isolation_Loss =~                                                            
##     htq1_19                  0.893    0.023   38.842    0.000    0.893    0.893
##     htq1_21                  0.937    0.023   39.922    0.000    0.937    0.937
##     htq1_30_34               0.443    0.054    8.273    0.000    0.443    0.443
##   ViolentVictimization =~                                                      
##     htq1_7_10                0.637    0.029   22.322    0.000    0.637    0.637
##     htq1_8_9                 0.562    0.040   14.176    0.000    0.562    0.562
##     htq1_11                  0.780    0.020   38.169    0.000    0.780    0.780
##     htq1_13_18               0.685    0.034   20.317    0.000    0.685    0.685
##     htq1_14                  0.851    0.019   45.932    0.000    0.851    0.851
##     htq1_16                  0.555    0.027   20.634    0.000    0.555    0.555
##     htq1_20_24               0.685    0.039   17.463    0.000    0.685    0.685
##     htq1_22                  0.683    0.030   22.551    0.000    0.683    0.683
##     htq1_25_to_29            0.402    0.044    9.197    0.000    0.402    0.402
##     htq1_23                  0.624    0.045   13.894    0.000    0.624    0.624
##   Destruction_Injury =~                                                        
##     htq1_04                  0.642    0.024   26.635    0.000    0.642    0.642
##     htq1_12_36               0.685    0.024   28.545    0.000    0.685    0.685
##     htq1_15                  0.693    0.022   31.576    0.000    0.693    0.693
##     htq1_32                  0.614    0.023   26.508    0.000    0.614    0.614
##     htq1_35                  0.664    0.024   27.396    0.000    0.664    0.664
##   WitnessViolence =~                                                           
##     htq1_39                  0.690    0.019   36.298    0.000    0.690    0.690
##     htq1_37                  0.836    0.014   59.196    0.000    0.836    0.836
##     htq1_38                  0.933    0.012   74.872    0.000    0.933    0.933
## 
## Covariances:
##                           Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##  .htq1_04 ~~                                                                   
##    .htq1_15                  0.316    0.027   11.857    0.000    0.316    0.571
##   ConflictTrauma ~~                                                            
##     Isolation_Loss           0.428    0.038   11.305    0.000    0.428    0.428
##     ViolentVctmztn           0.325    0.032   10.157    0.000    0.325    0.325
##     Destrctn_Injry           0.707    0.026   26.912    0.000    0.707    0.707
##     WitnessViolenc           0.520    0.025   20.419    0.000    0.520    0.520
##   Isolation_Loss ~~                                                            
##     ViolentVctmztn           0.509    0.032   15.785    0.000    0.509    0.509
##     Destrctn_Injry           0.594    0.031   19.162    0.000    0.594    0.594
##     WitnessViolenc           0.544    0.028   19.156    0.000    0.544    0.544
##   ViolentVictimization ~~                                                      
##     Destrctn_Injry           0.681    0.026   26.627    0.000    0.681    0.681
##     WitnessViolenc           0.763    0.019   40.105    0.000    0.763    0.763
##   Destruction_Injury ~~                                                        
##     WitnessViolenc           0.728    0.021   34.694    0.000    0.728    0.728
## 
## Thresholds:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##     htq1_05|t1       -0.692    0.025  -27.444    0.000   -0.692   -0.692
##     htq1_06|t1       -1.331    0.032  -41.194    0.000   -1.331   -1.331
##     htq1_17|t1       -0.876    0.027  -32.913    0.000   -0.876   -0.876
##     htq1_19|t1        1.131    0.029   38.534    0.000    1.131    1.131
##     htq1_21|t1        1.193    0.030   39.526    0.000    1.193    1.193
##     htq1_30_34|t1     1.656    0.039   42.211    0.000    1.656    1.656
##     htq1_7_10|t1      1.296    0.032   40.849    0.000    1.296    1.296
##     htq1_8_9|t1       1.716    0.041   41.974    0.000    1.716    1.716
##     htq1_11|t1        0.982    0.028   35.546    0.000    0.982    0.982
##     htq1_13_18|t1     1.620    0.038   42.293    0.000    1.620    1.620
##     htq1_14|t1        1.118    0.029   38.310    0.000    1.118    1.118
##     htq1_16|t1        0.963    0.027   35.101    0.000    0.963    0.963
##     htq1_20_24|t1     1.835    0.045   41.148    0.000    1.835    1.835
##     htq1_22|t1        1.411    0.034   41.823    0.000    1.411    1.411
##     htq1_25_t_29|1    1.623    0.038   42.287    0.000    1.623    1.623
##     htq1_23|t1        1.883    0.046   40.692    0.000    1.883    1.883
##     htq1_04|t1       -0.536    0.024  -22.018    0.000   -0.536   -0.536
##     htq1_12_36|t1     0.989    0.028   35.703    0.000    0.989    0.989
##     htq1_15|t1       -0.020    0.023   -0.884    0.377   -0.020   -0.020
##     htq1_32|t1        0.664    0.025   26.526    0.000    0.664    0.664
##     htq1_35|t1        0.890    0.027   33.278    0.000    0.890    0.890
##     htq1_39|t1        0.435    0.024   18.211    0.000    0.435    0.435
##     htq1_37|t1       -0.035    0.023   -1.510    0.131   -0.035   -0.035
##     htq1_38|t1        0.161    0.023    6.923    0.000    0.161    0.161
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .htq1_05           0.441                               0.441    0.441
##    .htq1_06           0.183                               0.183    0.183
##    .htq1_17           0.257                               0.257    0.257
##    .htq1_19           0.202                               0.202    0.202
##    .htq1_21           0.122                               0.122    0.122
##    .htq1_30_34        0.804                               0.804    0.804
##    .htq1_7_10         0.594                               0.594    0.594
##    .htq1_8_9          0.684                               0.684    0.684
##    .htq1_11           0.391                               0.391    0.391
##    .htq1_13_18        0.531                               0.531    0.531
##    .htq1_14           0.275                               0.275    0.275
##    .htq1_16           0.692                               0.692    0.692
##    .htq1_20_24        0.531                               0.531    0.531
##    .htq1_22           0.533                               0.533    0.533
##    .htq1_25_to_29     0.839                               0.839    0.839
##    .htq1_23           0.611                               0.611    0.611
##    .htq1_04           0.588                               0.588    0.588
##    .htq1_12_36        0.530                               0.530    0.530
##    .htq1_15           0.519                               0.519    0.519
##    .htq1_32           0.622                               0.622    0.622
##    .htq1_35           0.559                               0.559    0.559
##    .htq1_39           0.524                               0.524    0.524
##    .htq1_37           0.301                               0.301    0.301
##    .htq1_38           0.130                               0.130    0.130
##     ConflictTrauma    1.000                               1.000    1.000
##     Isolation_Loss    1.000                               1.000    1.000
##     ViolentVctmztn    1.000                               1.000    1.000
##     Destrctn_Injry    1.000                               1.000    1.000
##     WitnessViolenc    1.000                               1.000    1.000
idx <- lavInspect(fit_mod5fw, "case.idx")
fscores <- lavPredict(fit_mod5fw, transform = T)

## loop over factors
for (fs in colnames(fscores)) {
  data[idx, fs] <- fscores[ , fs]
}
head(data)
##   hhid_int restype respondent_cat q102b_guess_age primiparous htq1_04 htq1_05
## 1        3       1              0      -8.2957841           1       0       0
## 2        4       1              0      -4.2957841           1       0       1
## 3        6       1              0      -0.2957841           0       1       1
## 4        7       1              0       2.7042159           0       1       1
## 5        8       1              0      -7.2957841           1       0       1
## 6        9       1              0       4.7042159           0       1       1
##   htq1_06 htq1_7_10 htq1_8_9 htq1_11 htq1_12_36 htq1_13_18 htq1_14 htq1_15
## 1       0         0        0       0          0          0       0       0
## 2       1         0        0       0          0          0       0       0
## 3       1         0        0       0          0          0       0       0
## 4       1         0        0       0          0          0       0       1
## 5       1         0        0       0          0          0       0       0
## 6       1         0        0       0          0          0       0       1
##   htq1_16 htq1_17 htq1_19 htq1_20_24 htq1_21 htq1_22 htq1_23 htq1_25_to_29
## 1       0       0       0          0       0       0       0             0
## 2       0       1       0          0       0       0       0             0
## 3       0       1       0          0       0       0       0             0
## 4       0       1       0          0       0       0       0             0
## 5       0       0       0          0       0       0       0             0
## 6       0       1       0          0       0       0       0             1
##   htq1_30_34 htq1_32 htq1_35 htq1_37 htq1_38 htq1_39 htq1_sum htq_ptsd_dsm
## 1          0       0       0       1       0       0        1       2.8750
## 2          0       0       0       0       1       1        5       2.5000
## 3          0       0       0       0       0       0        4       1.3125
## 4          0       0       0       0       0       0        5       2.6875
## 5          0       0       0       1       0       0        3       1.5000
## 6          0       0       0       1       1       0        8       2.3750
##   htq_ptsd_total ace_2_1 ace_2_2 ace_3_1 ace_3_2 ace_3_3 ace_4_1 ace_4_2
## 1       2.666667       3       3       0       0       3       0       0
## 2       2.212121       4       4       0       0       2       0       1
## 3       1.272727       3       1       0       0       3       0       0
## 4       2.272727       4       4       0       0       0       0       0
## 5       1.363636       4       4       0       0       0       0       0
## 6       2.696970       2       4       0       0       0       0       0
##   ace_4_3 ace_4_4 ace_4_5 ace_4_6 ace_4_7 ace_4_8 ace_5_1 ace_5_2 ace_5_3
## 1       0       0       0       2       0       0       2       0       3
## 2       1       0       0       0       0       0       2       2       3
## 3       1       1       1       0       0       0       2       0       2
## 4       0       0       0       2       2       0       0       0       2
## 5       0       0       0       2       1       0       3       0       2
## 6       0       0       0       3       3       3       3       0       3
##   ace_5_4 ace_5_5 ace_5_6 ace_5_7 ace_5_8 ace_6_1 ace_6_2 ace_6_3 ace_7_1
## 1       2       0       0       0       0       0    <NA>       0       3
## 2       0       0       0       0       0       3       3       3       3
## 3       2       0       0       0       0       0    <NA>       0       3
## 4       0       0       0       0       0       3       3       2       3
## 5       0       0       0       0       0       0    <NA>       2       3
## 6       3       0       0       0       0       0    <NA>       3       3
##   ace_7_2 ace_7_3          ace_e_t ace_2_1R ace_2_2R ace_f_1 ace_f_2 ace_f_en
## 1       3       3       9:10:48 AM        1        1       0       0        0
## 2       3       2       8:30:00 AM        0        0       0       0        0
## 3       3       3       7:30:00 AM        1        3       0       1        1
## 4       3       3 2023-03-19 13-41        0        0       0       0        0
## 5       3       3       7:00:58 AM        0        0       0       0        0
## 6       3       3       8:36:07 AM        2        0       1       0        1
##   ace_f_pn_1 ace_f_pn_2 ace_f_pn_3 ace_f_pn ace_b_ah ace_b_dh ace_b_ih
## 1          0          0          1        1        0        0        0
## 2          0          0          0        0        0        1        1
## 3          0          0          1        1        0        0        1
## 4          0          0          0        0        0        0        0
## 5          0          0          0        0        0        0        0
## 6          0          0          0        0        0        0        0
##   ace_b_dd_1 ace_b_dd_2 ace_b_dd ace_f_hv_1 ace_f_hv_2 ace_f_hv_3 ace_f_hv
## 1          0          0        0          0          0          0        0
## 2          0          0        0          0          0          0        0
## 3          1          1        1          0          0          0        0
## 4          0          0        0          0          1          0        1
## 5          0          0        0          0          0          0        0
## 6          0          0        0          1          1          1        1
##   ace_f_ea_1 ace_f_ea_2 ace_f_ea ace_f_pa_1 ace_f_pa_2 ace_f_pa ace_b_sa_1
## 1          0          0        0          1          0        1          0
## 2          0          0        0          1          0        1          0
## 3          0          0        0          0          0        0          0
## 4          0          0        0          0          0        0          0
## 5          1          0        1          0          0        0          0
## 6          1          0        1          1          1        1          0
##   ace_b_sa_2 ace_b_sa_3 ace_b_sa_4 ace_b_sa ace_f_bu_1 ace_f_bu_2 ace_f_bu
## 1          0          0          0        0          0          0        0
## 2          0          0          0        0          1          1        1
## 3          0          0          0        0          0          0        0
## 4          0          0          0        0          1          0        1
## 5          0          0          0        0          0          0        0
## 6          0          0          0        0          0          1        1
##   ace_f_cv_1 ace_f_cv_2 ace_f_cv_3 ace_f_cv ace_frequency ConflictTrauma
## 1          1          1          1        1             3     -2.3493940
## 2          1          1          0        1             5      0.2513647
## 3          1          1          1        1             5      0.2390247
## 4          1          1          1        1             3      0.4390420
## 5          1          1          1        1             2     -0.9548046
## 6          1          1          1        1             6      0.6314491
##   Isolation_Loss ViolentVictimization Destruction_Injury WitnessViolence
## 1     -0.9307988           -0.6049161        -1.55697116      -0.2831504
## 2     -0.5007248           -0.5105563        -0.89249830       0.4582630
## 3     -0.7271977           -1.0211406        -0.67100446      -1.0430733
## 4     -0.4869772           -0.8023438        -0.01772711      -0.9085330
## 5     -0.7894892           -0.7051607        -1.26074699      -0.2554927
## 6     -0.1012761            0.1908505         0.34142527       0.6998006

ACE Run CFAs model with all sample

3 factor solution

model_3f <- "
#f1A_neglect =~ 
ChildAbuse =~ ace_4_6 + ace_4_7 + ace_4_8 + ace_5_1 + ace_5_2 + ace_5_3 + ace_5_4 + ace_6_1 + ace_6_3 
ChildNeglectSexual =~ ace_2_1R + ace_2_2R + ace_3_1 + ace_3_2 + ace_4_1 + ace_5_5 + ace_5_6 + ace_5_7 + ace_5_8
ChildComViolence =~ ace_7_1 + ace_7_2 + ace_7_3
ace_3_2 ~~ ace_4_1
ace_2_1R ~~ ace_2_2R 
ace_4_6 ~~  ace_4_7
ace_4_7 ~~  ace_4_8
"
fit_mod3f <- lavaan::cfa(model_3f, data = data,  auto.fix.first = FALSE, std.lv = TRUE)
t4 <- fitMeasures(fit_mod3f, fit.measures = c("npar", "fmin", "chisq", "df", "pvalue", "srmr", "cfi.scaled", "tli.scaled", "rmsea.scaled"))
knitr::kable(t4, caption = "Model fit statistics 4F", digits = 3)
Model fit statistics 4F
x
npar 79.00000000
fmin 0.22526725
chisq 1304.74790559
df 182.00000000
pvalue 0.00000000
srmr 0.09205578
cfi.scaled 0.94764344
tli.scaled 0.93958858
rmsea.scaled 0.04442849
summary(fit_mod3f, fit.measures = TRUE, standardized = TRUE)
## lavaan 0.6.17 ended normally after 29 iterations
## 
##   Estimator                                       DWLS
##   Optimization method                           NLMINB
##   Number of model parameters                        79
## 
##                                                   Used       Total
##   Number of observations                          2896        2965
## 
## Model Test User Model:
##                                               Standard      Scaled
##   Test Statistic                              1304.748    1222.023
##   Degrees of freedom                               182         182
##   P-value (Chi-square)                           0.000       0.000
##   Scaling correction factor                                  1.118
##   Shift parameter                                           55.087
##     simple second-order correction                                
## 
## Model Test Baseline Model:
## 
##   Test statistic                             33282.714   20074.237
##   Degrees of freedom                               210         210
##   P-value                                        0.000       0.000
##   Scaling correction factor                                  1.665
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.966       0.948
##   Tucker-Lewis Index (TLI)                       0.961       0.940
##                                                                   
##   Robust Comparative Fit Index (CFI)                            NA
##   Robust Tucker-Lewis Index (TLI)                               NA
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.046       0.044
##   90 Percent confidence interval - lower         0.044       0.042
##   90 Percent confidence interval - upper         0.049       0.047
##   P-value H_0: RMSEA <= 0.050                    0.996       1.000
##   P-value H_0: RMSEA >= 0.080                    0.000       0.000
##                                                                   
##   Robust RMSEA                                                  NA
##   90 Percent confidence interval - lower                        NA
##   90 Percent confidence interval - upper                        NA
##   P-value H_0: Robust RMSEA <= 0.050                            NA
##   P-value H_0: Robust RMSEA >= 0.080                            NA
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.092       0.092
## 
## Parameter Estimates:
## 
##   Parameterization                               Delta
##   Standard errors                           Robust.sem
##   Information                                 Expected
##   Information saturated (h1) model        Unstructured
## 
## Latent Variables:
##                         Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   ChildAbuse =~                                                              
##     ace_4_6                0.679    0.014   48.802    0.000    0.679    0.679
##     ace_4_7                0.663    0.016   40.314    0.000    0.663    0.663
##     ace_4_8                0.750    0.016   47.617    0.000    0.750    0.750
##     ace_5_1                0.736    0.013   54.849    0.000    0.736    0.736
##     ace_5_2                0.613    0.021   29.427    0.000    0.613    0.613
##     ace_5_3                0.633    0.015   42.021    0.000    0.633    0.633
##     ace_5_4                0.677    0.016   41.725    0.000    0.677    0.677
##     ace_6_1                0.552    0.019   29.704    0.000    0.552    0.552
##     ace_6_3                0.554    0.017   31.979    0.000    0.554    0.554
##   ChildNeglectSexual =~                                                      
##     ace_2_1R               0.333    0.035    9.414    0.000    0.333    0.333
##     ace_2_2R               0.264    0.034    7.702    0.000    0.264    0.264
##     ace_3_1                0.612    0.051   11.987    0.000    0.612    0.612
##     ace_3_2                0.621    0.077    8.082    0.000    0.621    0.621
##     ace_4_1                0.498    0.075    6.619    0.000    0.498    0.498
##     ace_5_5                0.844    0.036   23.727    0.000    0.844    0.844
##     ace_5_6                0.837    0.044   18.846    0.000    0.837    0.837
##     ace_5_7                0.456    0.047    9.657    0.000    0.456    0.456
##     ace_5_8                0.574    0.061    9.346    0.000    0.574    0.574
##   ChildComViolence =~                                                        
##     ace_7_1                0.714    0.021   33.970    0.000    0.714    0.714
##     ace_7_2                0.822    0.018   46.411    0.000    0.822    0.822
##     ace_7_3                0.847    0.017   48.725    0.000    0.847    0.847
## 
## Covariances:
##                         Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##  .ace_3_2 ~~                                                                 
##    .ace_4_1                0.594    0.076    7.797    0.000    0.594    0.873
##  .ace_2_1R ~~                                                                
##    .ace_2_2R               0.374    0.023   16.093    0.000    0.374    0.411
##  .ace_4_6 ~~                                                                 
##    .ace_4_7                0.269    0.015   17.454    0.000    0.269    0.490
##  .ace_4_7 ~~                                                                 
##    .ace_4_8                0.286    0.019   15.037    0.000    0.286    0.577
##   ChildAbuse ~~                                                              
##     ChildNeglctSxl         0.496    0.034   14.432    0.000    0.496    0.496
##     ChildComViolnc         0.410    0.021   19.510    0.000    0.410    0.410
##   ChildNeglectSexual ~~                                                      
##     ChildComViolnc         0.054    0.038    1.427    0.154    0.054    0.054
## 
## Thresholds:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##     ace_4_6|t1       -0.465    0.024  -19.172    0.000   -0.465   -0.465
##     ace_4_6|t2       -0.314    0.024  -13.244    0.000   -0.314   -0.314
##     ace_4_6|t3        0.356    0.024   14.942    0.000    0.356    0.356
##     ace_4_7|t1       -0.128    0.023   -5.461    0.000   -0.128   -0.128
##     ace_4_7|t2        0.055    0.023    2.341    0.019    0.055    0.055
##     ace_4_7|t3        0.597    0.025   24.013    0.000    0.597    0.597
##     ace_4_8|t1        0.455    0.024   18.805    0.000    0.455    0.455
##     ace_4_8|t2        0.638    0.025   25.417    0.000    0.638    0.638
##     ace_4_8|t3        1.061    0.029   36.911    0.000    1.061    1.061
##     ace_5_1|t1       -0.227    0.024   -9.653    0.000   -0.227   -0.227
##     ace_5_1|t2       -0.108    0.023   -4.607    0.000   -0.108   -0.108
##     ace_5_1|t3        0.376    0.024   15.717    0.000    0.376    0.376
##     ace_5_2|t1        0.672    0.025   26.562    0.000    0.672    0.672
##     ace_5_2|t2        0.838    0.027   31.599    0.000    0.838    0.838
##     ace_5_2|t3        1.362    0.033   41.112    0.000    1.362    1.362
##     ace_5_3|t1       -0.658    0.025  -26.097    0.000   -0.658   -0.658
##     ace_5_3|t2       -0.503    0.024  -20.635    0.000   -0.503   -0.503
##     ace_5_3|t3        0.236    0.024   10.024    0.000    0.236    0.236
##     ace_5_4|t1        0.346    0.024   14.537    0.000    0.346    0.346
##     ace_5_4|t2        0.518    0.024   21.182    0.000    0.518    0.518
##     ace_5_4|t3        0.973    0.028   35.015    0.000    0.973    0.973
##     ace_6_1|t1       -0.155    0.023   -6.612    0.000   -0.155   -0.155
##     ace_6_1|t2       -0.104    0.023   -4.458    0.000   -0.104   -0.104
##     ace_6_1|t3        0.258    0.024   10.950    0.000    0.258    0.258
##     ace_6_3|t1       -0.281    0.024  -11.875    0.000   -0.281   -0.281
##     ace_6_3|t2       -0.177    0.023   -7.577    0.000   -0.177   -0.177
##     ace_6_3|t3        0.414    0.024   17.226    0.000    0.414    0.414
##     ace_2_1R|t1       0.228    0.024    9.690    0.000    0.228    0.228
##     ace_2_1R|t2       0.858    0.027   32.143    0.000    0.858    0.858
##     ace_2_1R|t3       1.430    0.034   41.578    0.000    1.430    1.430
##     ace_2_1R|t4       2.019    0.052   38.711    0.000    2.019    2.019
##     ace_2_2R|t1       0.017    0.023    0.743    0.457    0.017    0.017
##     ace_2_2R|t2       0.618    0.025   24.734    0.000    0.618    0.618
##     ace_2_2R|t3       1.094    0.029   37.534    0.000    1.094    1.094
##     ace_2_2R|t4       1.704    0.041   41.672    0.000    1.704    1.704
##     ace_3_1|t1        1.563    0.037   41.966    0.000    1.563    1.563
##     ace_3_2|t1        2.165    0.059   36.464    0.000    2.165    2.165
##     ace_4_1|t1        2.019    0.052   38.711    0.000    2.019    2.019
##     ace_5_5|t1        1.529    0.036   41.929    0.000    1.529    1.529
##     ace_5_6|t1        1.956    0.050   39.521    0.000    1.956    1.956
##     ace_5_7|t1        1.605    0.038   41.952    0.000    1.605    1.605
##     ace_5_8|t1        2.203    0.061   35.818    0.000    2.203    2.203
##     ace_7_1|t1       -2.032    0.053  -38.524    0.000   -2.032   -2.032
##     ace_7_1|t2       -1.814    0.044  -40.977    0.000   -1.814   -1.814
##     ace_7_1|t3       -0.808    0.026  -30.741    0.000   -0.808   -0.808
##     ace_7_2|t1       -1.569    0.037  -41.968    0.000   -1.569   -1.569
##     ace_7_2|t2       -1.263    0.031  -40.126    0.000   -1.263   -1.263
##     ace_7_2|t3       -0.414    0.024  -17.226    0.000   -0.414   -0.414
##     ace_7_3|t1       -0.985    0.028  -35.302    0.000   -0.985   -0.985
##     ace_7_3|t2       -0.826    0.026  -31.257    0.000   -0.826   -0.826
##     ace_7_3|t3       -0.132    0.023   -5.647    0.000   -0.132   -0.132
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .ace_4_6           0.539                               0.539    0.539
##    .ace_4_7           0.561                               0.561    0.561
##    .ace_4_8           0.437                               0.437    0.437
##    .ace_5_1           0.459                               0.459    0.459
##    .ace_5_2           0.624                               0.624    0.624
##    .ace_5_3           0.600                               0.600    0.600
##    .ace_5_4           0.542                               0.542    0.542
##    .ace_6_1           0.695                               0.695    0.695
##    .ace_6_3           0.693                               0.693    0.693
##    .ace_2_1R          0.889                               0.889    0.889
##    .ace_2_2R          0.930                               0.930    0.930
##    .ace_3_1           0.625                               0.625    0.625
##    .ace_3_2           0.615                               0.615    0.615
##    .ace_4_1           0.752                               0.752    0.752
##    .ace_5_5           0.288                               0.288    0.288
##    .ace_5_6           0.299                               0.299    0.299
##    .ace_5_7           0.792                               0.792    0.792
##    .ace_5_8           0.671                               0.671    0.671
##    .ace_7_1           0.491                               0.491    0.491
##    .ace_7_2           0.325                               0.325    0.325
##    .ace_7_3           0.282                               0.282    0.282
##     ChildAbuse        1.000                               1.000    1.000
##     ChildNeglctSxl    1.000                               1.000    1.000
##     ChildComViolnc    1.000                               1.000    1.000
idx <- lavInspect(fit_mod3f, "case.idx")
fscores <- lavPredict(fit_mod3f, transform = T)

## loop over factors
for (fs in colnames(fscores)) {
  data[idx, fs] <- fscores[ , fs]
}
head(data)
##   hhid_int restype respondent_cat q102b_guess_age primiparous htq1_04 htq1_05
## 1        3       1              0      -8.2957841           1       0       0
## 2        4       1              0      -4.2957841           1       0       1
## 3        6       1              0      -0.2957841           0       1       1
## 4        7       1              0       2.7042159           0       1       1
## 5        8       1              0      -7.2957841           1       0       1
## 6        9       1              0       4.7042159           0       1       1
##   htq1_06 htq1_7_10 htq1_8_9 htq1_11 htq1_12_36 htq1_13_18 htq1_14 htq1_15
## 1       0         0        0       0          0          0       0       0
## 2       1         0        0       0          0          0       0       0
## 3       1         0        0       0          0          0       0       0
## 4       1         0        0       0          0          0       0       1
## 5       1         0        0       0          0          0       0       0
## 6       1         0        0       0          0          0       0       1
##   htq1_16 htq1_17 htq1_19 htq1_20_24 htq1_21 htq1_22 htq1_23 htq1_25_to_29
## 1       0       0       0          0       0       0       0             0
## 2       0       1       0          0       0       0       0             0
## 3       0       1       0          0       0       0       0             0
## 4       0       1       0          0       0       0       0             0
## 5       0       0       0          0       0       0       0             0
## 6       0       1       0          0       0       0       0             1
##   htq1_30_34 htq1_32 htq1_35 htq1_37 htq1_38 htq1_39 htq1_sum htq_ptsd_dsm
## 1          0       0       0       1       0       0        1       2.8750
## 2          0       0       0       0       1       1        5       2.5000
## 3          0       0       0       0       0       0        4       1.3125
## 4          0       0       0       0       0       0        5       2.6875
## 5          0       0       0       1       0       0        3       1.5000
## 6          0       0       0       1       1       0        8       2.3750
##   htq_ptsd_total ace_2_1 ace_2_2 ace_3_1 ace_3_2 ace_3_3 ace_4_1 ace_4_2
## 1       2.666667       3       3       0       0       3       0       0
## 2       2.212121       4       4       0       0       2       0       1
## 3       1.272727       3       1       0       0       3       0       0
## 4       2.272727       4       4       0       0       0       0       0
## 5       1.363636       4       4       0       0       0       0       0
## 6       2.696970       2       4       0       0       0       0       0
##   ace_4_3 ace_4_4 ace_4_5 ace_4_6 ace_4_7 ace_4_8 ace_5_1 ace_5_2 ace_5_3
## 1       0       0       0       2       0       0       2       0       3
## 2       1       0       0       0       0       0       2       2       3
## 3       1       1       1       0       0       0       2       0       2
## 4       0       0       0       2       2       0       0       0       2
## 5       0       0       0       2       1       0       3       0       2
## 6       0       0       0       3       3       3       3       0       3
##   ace_5_4 ace_5_5 ace_5_6 ace_5_7 ace_5_8 ace_6_1 ace_6_2 ace_6_3 ace_7_1
## 1       2       0       0       0       0       0    <NA>       0       3
## 2       0       0       0       0       0       3       3       3       3
## 3       2       0       0       0       0       0    <NA>       0       3
## 4       0       0       0       0       0       3       3       2       3
## 5       0       0       0       0       0       0    <NA>       2       3
## 6       3       0       0       0       0       0    <NA>       3       3
##   ace_7_2 ace_7_3          ace_e_t ace_2_1R ace_2_2R ace_f_1 ace_f_2 ace_f_en
## 1       3       3       9:10:48 AM        1        1       0       0        0
## 2       3       2       8:30:00 AM        0        0       0       0        0
## 3       3       3       7:30:00 AM        1        3       0       1        1
## 4       3       3 2023-03-19 13-41        0        0       0       0        0
## 5       3       3       7:00:58 AM        0        0       0       0        0
## 6       3       3       8:36:07 AM        2        0       1       0        1
##   ace_f_pn_1 ace_f_pn_2 ace_f_pn_3 ace_f_pn ace_b_ah ace_b_dh ace_b_ih
## 1          0          0          1        1        0        0        0
## 2          0          0          0        0        0        1        1
## 3          0          0          1        1        0        0        1
## 4          0          0          0        0        0        0        0
## 5          0          0          0        0        0        0        0
## 6          0          0          0        0        0        0        0
##   ace_b_dd_1 ace_b_dd_2 ace_b_dd ace_f_hv_1 ace_f_hv_2 ace_f_hv_3 ace_f_hv
## 1          0          0        0          0          0          0        0
## 2          0          0        0          0          0          0        0
## 3          1          1        1          0          0          0        0
## 4          0          0        0          0          1          0        1
## 5          0          0        0          0          0          0        0
## 6          0          0        0          1          1          1        1
##   ace_f_ea_1 ace_f_ea_2 ace_f_ea ace_f_pa_1 ace_f_pa_2 ace_f_pa ace_b_sa_1
## 1          0          0        0          1          0        1          0
## 2          0          0        0          1          0        1          0
## 3          0          0        0          0          0        0          0
## 4          0          0        0          0          0        0          0
## 5          1          0        1          0          0        0          0
## 6          1          0        1          1          1        1          0
##   ace_b_sa_2 ace_b_sa_3 ace_b_sa_4 ace_b_sa ace_f_bu_1 ace_f_bu_2 ace_f_bu
## 1          0          0          0        0          0          0        0
## 2          0          0          0        0          1          1        1
## 3          0          0          0        0          0          0        0
## 4          0          0          0        0          1          0        1
## 5          0          0          0        0          0          0        0
## 6          0          0          0        0          0          1        1
##   ace_f_cv_1 ace_f_cv_2 ace_f_cv_3 ace_f_cv ace_frequency ConflictTrauma
## 1          1          1          1        1             3     -2.3493940
## 2          1          1          0        1             5      0.2513647
## 3          1          1          1        1             5      0.2390247
## 4          1          1          1        1             3      0.4390420
## 5          1          1          1        1             2     -0.9548046
## 6          1          1          1        1             6      0.6314491
##   Isolation_Loss ViolentVictimization Destruction_Injury WitnessViolence
## 1     -0.9307988           -0.6049161        -1.55697116      -0.2831504
## 2     -0.5007248           -0.5105563        -0.89249830       0.4582630
## 3     -0.7271977           -1.0211406        -0.67100446      -1.0430733
## 4     -0.4869772           -0.8023438        -0.01772711      -0.9085330
## 5     -0.7894892           -0.7051607        -1.26074699      -0.2554927
## 6     -0.1012761            0.1908505         0.34142527       0.6998006
##    ChildAbuse ChildNeglectSexual ChildComViolence
## 1 -0.16468991        -0.10757488       0.83166654
## 2  0.09195881        -0.68873311      -0.01513485
## 3 -0.57054096         0.04951246       0.76862702
## 4 -0.23782091        -0.94025951       0.85256055
## 5 -0.10068003        -0.88215937       0.87140820
## 6  1.63846703         0.34604231       1.14614478

Run a joint model of the factors

dataf <- data
data <- data %>% select(-c(ConflictTrauma ,Isolation_Loss, ViolentVictimization,Destruction_Injury ,WitnessViolence, ChildAbuse, ChildNeglectSexual, ChildComViolence))
model_j <- "
ConflictTrauma =~ htq1_05 + htq1_06  + htq1_17 
Isolation_Loss =~ htq1_19 + htq1_21 + htq1_30_34
ViolentVictimization =~ htq1_7_10 + htq1_8_9 + htq1_11 + htq1_13_18 + htq1_14 + htq1_16 + htq1_20_24 + htq1_22  + htq1_25_to_29 + htq1_23 
Destruction_Injury =~ htq1_04 + htq1_12_36 +  htq1_15 + htq1_32 + htq1_35
WitnessViolence =~ htq1_39 + htq1_37 + htq1_38
htq1_04 ~~ htq1_15 

ChildAbuse =~ ace_4_6 + ace_4_7 + ace_4_8 + ace_5_1 + ace_5_2 + ace_5_3 + ace_5_4 + ace_6_1 + ace_6_3 
ChildNeglectSexual =~ ace_2_1R + ace_2_2R + ace_3_1 + ace_3_2 + ace_4_1 + ace_5_5 + ace_5_6 + ace_5_7 + ace_5_8
ChildComViolence =~ ace_7_1 + ace_7_2 + ace_7_3
ace_3_2 ~~ ace_4_1
ace_2_1R ~~ ace_2_2R 
ace_4_6 ~~  ace_4_7
ace_4_7 ~~  ace_4_8
"

fit_modj <- cfa(model_j, data = data,  auto.fix.first = FALSE, std.lv = TRUE, ordered = T)
tj <- fitMeasures(fit_modj, fit.measures = c("npar", "fmin", "chisq", "df", "pvalue", "srmr", "cfi.scaled", "tli.scaled", "rmsea.scaled"))
knitr::kable(tj, caption = "Model fit statistics Joint", digits = 3)
Model fit statistics Joint
x
npar 153.00000000
fmin 0.70145004
chisq 4037.54644233
df 912.00000000
pvalue 0.00000000
srmr 0.08306356
cfi.scaled 0.93148410
tli.scaled 0.92562418
rmsea.scaled 0.03109901
summary(fit_modj, fit.measures = TRUE, standardized = TRUE)
## lavaan 0.6.17 ended normally after 37 iterations
## 
##   Estimator                                       DWLS
##   Optimization method                           NLMINB
##   Number of model parameters                       153
## 
##                                                   Used       Total
##   Number of observations                          2878        2965
## 
## Model Test User Model:
##                                               Standard      Scaled
##   Test Statistic                              4037.546    3449.628
##   Degrees of freedom                               912         912
##   P-value (Chi-square)                           0.000       0.000
##   Scaling correction factor                                  1.307
##   Shift parameter                                          361.220
##     simple second-order correction                                
## 
## Model Test Baseline Model:
## 
##   Test statistic                             77430.812   38027.064
##   Degrees of freedom                               990         990
##   P-value                                        0.000       0.000
##   Scaling correction factor                                  2.064
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.959       0.931
##   Tucker-Lewis Index (TLI)                       0.956       0.926
##                                                                   
##   Robust Comparative Fit Index (CFI)                            NA
##   Robust Tucker-Lewis Index (TLI)                               NA
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.035       0.031
##   90 Percent confidence interval - lower         0.033       0.030
##   90 Percent confidence interval - upper         0.036       0.032
##   P-value H_0: RMSEA <= 0.050                    1.000       1.000
##   P-value H_0: RMSEA >= 0.080                    0.000       0.000
##                                                                   
##   Robust RMSEA                                                  NA
##   90 Percent confidence interval - lower                        NA
##   90 Percent confidence interval - upper                        NA
##   P-value H_0: Robust RMSEA <= 0.050                            NA
##   P-value H_0: Robust RMSEA >= 0.080                            NA
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.083       0.083
## 
## Parameter Estimates:
## 
##   Parameterization                               Delta
##   Standard errors                           Robust.sem
##   Information                                 Expected
##   Information saturated (h1) model        Unstructured
## 
## Latent Variables:
##                           Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   ConflictTrauma =~                                                            
##     htq1_05                  0.746    0.022   33.294    0.000    0.746    0.746
##     htq1_06                  0.896    0.025   36.202    0.000    0.896    0.896
##     htq1_17                  0.869    0.020   43.297    0.000    0.869    0.869
##   Isolation_Loss =~                                                            
##     htq1_19                  0.896    0.024   37.571    0.000    0.896    0.896
##     htq1_21                  0.936    0.025   37.945    0.000    0.936    0.936
##     htq1_30_34               0.461    0.055    8.375    0.000    0.461    0.461
##   ViolentVictimization =~                                                      
##     htq1_7_10                0.641    0.029   22.223    0.000    0.641    0.641
##     htq1_8_9                 0.589    0.041   14.412    0.000    0.589    0.589
##     htq1_11                  0.786    0.020   38.607    0.000    0.786    0.786
##     htq1_13_18               0.650    0.034   19.094    0.000    0.650    0.650
##     htq1_14                  0.838    0.019   44.801    0.000    0.838    0.838
##     htq1_16                  0.571    0.027   21.525    0.000    0.571    0.571
##     htq1_20_24               0.671    0.039   17.206    0.000    0.671    0.671
##     htq1_22                  0.709    0.030   23.888    0.000    0.709    0.709
##     htq1_25_to_29            0.489    0.041   11.911    0.000    0.489    0.489
##     htq1_23                  0.579    0.047   12.307    0.000    0.579    0.579
##   Destruction_Injury =~                                                        
##     htq1_04                  0.592    0.025   23.260    0.000    0.592    0.592
##     htq1_12_36               0.700    0.025   27.709    0.000    0.700    0.700
##     htq1_15                  0.683    0.023   29.599    0.000    0.683    0.683
##     htq1_32                  0.624    0.024   25.587    0.000    0.624    0.624
##     htq1_35                  0.689    0.025   27.600    0.000    0.689    0.689
##   WitnessViolence =~                                                           
##     htq1_39                  0.685    0.020   34.876    0.000    0.685    0.685
##     htq1_37                  0.847    0.014   60.234    0.000    0.847    0.847
##     htq1_38                  0.927    0.013   70.755    0.000    0.927    0.927
##   ChildAbuse =~                                                                
##     ace_4_6                  0.662    0.015   43.307    0.000    0.662    0.662
##     ace_4_7                  0.688    0.017   41.168    0.000    0.688    0.688
##     ace_4_8                  0.796    0.016   50.450    0.000    0.796    0.796
##     ace_5_1                  0.683    0.015   45.935    0.000    0.683    0.683
##     ace_5_2                  0.612    0.022   28.102    0.000    0.612    0.612
##     ace_5_3                  0.606    0.016   38.105    0.000    0.606    0.606
##     ace_5_4                  0.676    0.017   40.398    0.000    0.676    0.676
##     ace_6_1                  0.596    0.018   32.540    0.000    0.596    0.596
##     ace_6_3                  0.569    0.018   32.044    0.000    0.569    0.569
##   ChildNeglectSexual =~                                                        
##     ace_2_1R                 0.321    0.034    9.347    0.000    0.321    0.321
##     ace_2_2R                 0.365    0.033   11.217    0.000    0.365    0.365
##     ace_3_1                  0.552    0.050   10.936    0.000    0.552    0.552
##     ace_3_2                  0.570    0.085    6.740    0.000    0.570    0.570
##     ace_4_1                  0.437    0.075    5.819    0.000    0.437    0.437
##     ace_5_5                  0.863    0.032   27.188    0.000    0.863    0.863
##     ace_5_6                  0.800    0.045   17.807    0.000    0.800    0.800
##     ace_5_7                  0.509    0.047   10.867    0.000    0.509    0.509
##     ace_5_8                  0.578    0.064    8.965    0.000    0.578    0.578
##   ChildComViolence =~                                                          
##     ace_7_1                  0.708    0.022   32.273    0.000    0.708    0.708
##     ace_7_2                  0.798    0.018   45.275    0.000    0.798    0.798
##     ace_7_3                  0.875    0.018   49.209    0.000    0.875    0.875
## 
## Covariances:
##                           Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##  .htq1_04 ~~                                                                   
##    .htq1_15                  0.354    0.027   13.227    0.000    0.354    0.602
##  .ace_3_2 ~~                                                                   
##    .ace_4_1                  0.653    0.073    9.011    0.000    0.653    0.884
##  .ace_2_1R ~~                                                                  
##    .ace_2_2R                 0.343    0.024   14.051    0.000    0.343    0.389
##  .ace_4_6 ~~                                                                   
##    .ace_4_7                  0.264    0.016   16.061    0.000    0.264    0.486
##  .ace_4_7 ~~                                                                   
##    .ace_4_8                  0.235    0.019   12.204    0.000    0.235    0.536
##   ConflictTrauma ~~                                                            
##     Isolation_Loss           0.429    0.038   11.154    0.000    0.429    0.429
##     ViolentVctmztn           0.314    0.032    9.711    0.000    0.314    0.314
##     Destrctn_Injry           0.708    0.027   26.210    0.000    0.708    0.708
##     WitnessViolenc           0.523    0.026   20.374    0.000    0.523    0.523
##     ChildAbuse               0.097    0.029    3.304    0.001    0.097    0.097
##     ChildNeglctSxl          -0.060    0.043   -1.413    0.158   -0.060   -0.060
##     ChildComViolnc           0.274    0.030    9.125    0.000    0.274    0.274
##   Isolation_Loss ~~                                                            
##     ViolentVctmztn           0.500    0.033   15.213    0.000    0.500    0.500
##     Destrctn_Injry           0.591    0.031   18.817    0.000    0.591    0.591
##     WitnessViolenc           0.540    0.029   18.720    0.000    0.540    0.540
##     ChildAbuse               0.260    0.030    8.584    0.000    0.260    0.260
##     ChildNeglctSxl           0.356    0.045    7.958    0.000    0.356    0.356
##     ChildComViolnc           0.087    0.036    2.452    0.014    0.087    0.087
##   ViolentVictimization ~~                                                      
##     Destrctn_Injry           0.679    0.026   26.108    0.000    0.679    0.679
##     WitnessViolenc           0.762    0.019   39.582    0.000    0.762    0.762
##     ChildAbuse               0.507    0.025   20.151    0.000    0.507    0.507
##     ChildNeglctSxl           0.604    0.036   16.741    0.000    0.604    0.604
##     ChildComViolnc           0.031    0.032    0.974    0.330    0.031    0.031
##   Destruction_Injury ~~                                                        
##     WitnessViolenc           0.736    0.021   34.689    0.000    0.736    0.736
##     ChildAbuse               0.310    0.026   11.718    0.000    0.310    0.310
##     ChildNeglctSxl           0.274    0.039    6.979    0.000    0.274    0.274
##     ChildComViolnc           0.120    0.029    4.176    0.000    0.120    0.120
##   WitnessViolence ~~                                                           
##     ChildAbuse               0.340    0.024   14.147    0.000    0.340    0.340
##     ChildNeglctSxl           0.385    0.035   11.130    0.000    0.385    0.385
##     ChildComViolnc           0.215    0.027    8.095    0.000    0.215    0.215
##   ChildAbuse ~~                                                                
##     ChildNeglctSxl           0.485    0.034   14.450    0.000    0.485    0.485
##     ChildComViolnc           0.409    0.021   19.437    0.000    0.409    0.409
##   ChildNeglectSexual ~~                                                        
##     ChildComViolnc           0.050    0.037    1.371    0.170    0.050    0.050
## 
## Thresholds:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##     htq1_05|t1       -0.696    0.026  -27.246    0.000   -0.696   -0.696
##     htq1_06|t1       -1.328    0.033  -40.691    0.000   -1.328   -1.328
##     htq1_17|t1       -0.874    0.027  -32.465    0.000   -0.874   -0.874
##     htq1_19|t1        1.130    0.030   38.065    0.000    1.130    1.130
##     htq1_21|t1        1.202    0.031   39.198    0.000    1.202    1.202
##     htq1_30_34|t1     1.651    0.040   41.733    0.000    1.651    1.651
##     htq1_7_10|t1      1.301    0.032   40.425    0.000    1.301    1.301
##     htq1_8_9|t1       1.720    0.041   41.466    0.000    1.720    1.720
##     htq1_11|t1        0.989    0.028   35.290    0.000    0.989    0.989
##     htq1_13_18|t1     1.621    0.039   41.799    0.000    1.621    1.621
##     htq1_14|t1        1.118    0.030   37.866    0.000    1.118    1.118
##     htq1_16|t1        0.968    0.028   34.810    0.000    0.968    0.968
##     htq1_20_24|t1     1.838    0.045   40.640    0.000    1.838    1.838
##     htq1_22|t1        1.422    0.034   41.403    0.000    1.422    1.422
##     htq1_25_t_29|1    1.618    0.039   41.804    0.000    1.618    1.618
##     htq1_23|t1        1.877    0.047   40.272    0.000    1.877    1.877
##     htq1_04|t1       -0.535    0.025  -21.721    0.000   -0.535   -0.535
##     htq1_12_36|t1     0.984    0.028   35.162    0.000    0.984    0.984
##     htq1_15|t1       -0.021    0.023   -0.895    0.371   -0.021   -0.021
##     htq1_32|t1        0.663    0.025   26.174    0.000    0.663    0.663
##     htq1_35|t1        0.889    0.027   32.869    0.000    0.889    0.889
##     htq1_39|t1        0.432    0.024   17.869    0.000    0.432    0.432
##     htq1_37|t1       -0.032    0.023   -1.379    0.168   -0.032   -0.032
##     htq1_38|t1        0.159    0.023    6.781    0.000    0.159    0.159
##     ace_4_6|t1       -0.468    0.024  -19.230    0.000   -0.468   -0.468
##     ace_4_6|t2       -0.320    0.024  -13.433    0.000   -0.320   -0.320
##     ace_4_6|t3        0.352    0.024   14.730    0.000    0.352    0.352
##     ace_4_7|t1       -0.129    0.023   -5.515    0.000   -0.129   -0.129
##     ace_4_7|t2        0.051    0.023    2.162    0.031    0.051    0.051
##     ace_4_7|t3        0.592    0.025   23.759    0.000    0.592    0.592
##     ace_4_8|t1        0.456    0.024   18.789    0.000    0.456    0.456
##     ace_4_8|t2        0.638    0.025   25.348    0.000    0.638    0.638
##     ace_4_8|t3        1.057    0.029   36.718    0.000    1.057    1.057
##     ace_5_1|t1       -0.229    0.024   -9.720    0.000   -0.229   -0.229
##     ace_5_1|t2       -0.111    0.023   -4.733    0.000   -0.111   -0.111
##     ace_5_1|t3        0.373    0.024   15.580    0.000    0.373    0.373
##     ace_5_2|t1        0.670    0.025   26.389    0.000    0.670    0.670
##     ace_5_2|t2        0.834    0.027   31.376    0.000    0.834    0.834
##     ace_5_2|t3        1.358    0.033   40.956    0.000    1.358    1.358
##     ace_5_3|t1       -0.660    0.025  -26.067    0.000   -0.660   -0.660
##     ace_5_3|t2       -0.505    0.024  -20.624    0.000   -0.505   -0.505
##     ace_5_3|t3        0.233    0.024    9.869    0.000    0.233    0.233
##     ace_5_4|t1        0.347    0.024   14.544    0.000    0.347    0.347
##     ace_5_4|t2        0.520    0.025   21.173    0.000    0.520    0.520
##     ace_5_4|t3        0.975    0.028   34.970    0.000    0.975    0.975
##     ace_6_1|t1       -0.152    0.023   -6.483    0.000   -0.152   -0.152
##     ace_6_1|t2       -0.102    0.023   -4.360    0.000   -0.102   -0.102
##     ace_6_1|t3        0.260    0.024   10.984    0.000    0.260    0.260
##     ace_6_3|t1       -0.282    0.024  -11.912    0.000   -0.282   -0.282
##     ace_6_3|t2       -0.180    0.024   -7.637    0.000   -0.180   -0.180
##     ace_6_3|t3        0.412    0.024   17.095    0.000    0.412    0.412
##     ace_2_1R|t1       0.234    0.024    9.906    0.000    0.234    0.234
##     ace_2_1R|t2       0.865    0.027   32.228    0.000    0.865    0.865
##     ace_2_1R|t3       1.439    0.035   41.495    0.000    1.439    1.439
##     ace_2_1R|t4       2.016    0.052   38.627    0.000    2.016    2.016
##     ace_2_2R|t1       0.021    0.023    0.895    0.371    0.021    0.021
##     ace_2_2R|t2       0.622    0.025   24.808    0.000    0.622    0.622
##     ace_2_2R|t3       1.099    0.029   37.520    0.000    1.099    1.099
##     ace_2_2R|t4       1.705    0.041   41.539    0.000    1.705    1.705
##     ace_3_1|t1        1.566    0.037   41.836    0.000    1.566    1.566
##     ace_3_2|t1        2.163    0.059   36.392    0.000    2.163    2.163
##     ace_4_1|t1        2.016    0.052   38.627    0.000    2.016    2.016
##     ace_5_5|t1        1.525    0.036   41.793    0.000    1.525    1.525
##     ace_5_6|t1        1.954    0.050   39.430    0.000    1.954    1.954
##     ace_5_7|t1        1.602    0.038   41.825    0.000    1.602    1.602
##     ace_5_8|t1        2.200    0.062   35.749    0.000    2.200    2.200
##     ace_7_1|t1       -2.030    0.053  -38.441    0.000   -2.030   -2.030
##     ace_7_1|t2       -1.811    0.044  -40.872    0.000   -1.811   -1.811
##     ace_7_1|t3       -0.808    0.026  -30.654    0.000   -0.808   -0.808
##     ace_7_2|t1       -1.566    0.037  -41.836    0.000   -1.566   -1.566
##     ace_7_2|t2       -1.260    0.032  -39.958    0.000   -1.260   -1.260
##     ace_7_2|t3       -0.416    0.024  -17.242    0.000   -0.416   -0.416
##     ace_7_3|t1       -0.981    0.028  -35.098    0.000   -0.981   -0.981
##     ace_7_3|t2       -0.824    0.026  -31.102    0.000   -0.824   -0.824
##     ace_7_3|t3       -0.133    0.023   -5.664    0.000   -0.133   -0.133
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .htq1_05           0.443                               0.443    0.443
##    .htq1_06           0.197                               0.197    0.197
##    .htq1_17           0.245                               0.245    0.245
##    .htq1_19           0.197                               0.197    0.197
##    .htq1_21           0.125                               0.125    0.125
##    .htq1_30_34        0.788                               0.788    0.788
##    .htq1_7_10         0.589                               0.589    0.589
##    .htq1_8_9          0.653                               0.653    0.653
##    .htq1_11           0.383                               0.383    0.383
##    .htq1_13_18        0.577                               0.577    0.577
##    .htq1_14           0.297                               0.297    0.297
##    .htq1_16           0.673                               0.673    0.673
##    .htq1_20_24        0.550                               0.550    0.550
##    .htq1_22           0.498                               0.498    0.498
##    .htq1_25_to_29     0.761                               0.761    0.761
##    .htq1_23           0.665                               0.665    0.665
##    .htq1_04           0.650                               0.650    0.650
##    .htq1_12_36        0.510                               0.510    0.510
##    .htq1_15           0.533                               0.533    0.533
##    .htq1_32           0.611                               0.611    0.611
##    .htq1_35           0.526                               0.526    0.526
##    .htq1_39           0.531                               0.531    0.531
##    .htq1_37           0.282                               0.282    0.282
##    .htq1_38           0.140                               0.140    0.140
##    .ace_4_6           0.562                               0.562    0.562
##    .ace_4_7           0.527                               0.527    0.527
##    .ace_4_8           0.367                               0.367    0.367
##    .ace_5_1           0.534                               0.534    0.534
##    .ace_5_2           0.626                               0.626    0.626
##    .ace_5_3           0.633                               0.633    0.633
##    .ace_5_4           0.543                               0.543    0.543
##    .ace_6_1           0.644                               0.644    0.644
##    .ace_6_3           0.676                               0.676    0.676
##    .ace_2_1R          0.897                               0.897    0.897
##    .ace_2_2R          0.867                               0.867    0.867
##    .ace_3_1           0.695                               0.695    0.695
##    .ace_3_2           0.675                               0.675    0.675
##    .ace_4_1           0.809                               0.809    0.809
##    .ace_5_5           0.255                               0.255    0.255
##    .ace_5_6           0.360                               0.360    0.360
##    .ace_5_7           0.741                               0.741    0.741
##    .ace_5_8           0.666                               0.666    0.666
##    .ace_7_1           0.498                               0.498    0.498
##    .ace_7_2           0.363                               0.363    0.363
##    .ace_7_3           0.235                               0.235    0.235
##     ConflictTrauma    1.000                               1.000    1.000
##     Isolation_Loss    1.000                               1.000    1.000
##     ViolentVctmztn    1.000                               1.000    1.000
##     Destrctn_Injry    1.000                               1.000    1.000
##     WitnessViolenc    1.000                               1.000    1.000
##     ChildAbuse        1.000                               1.000    1.000
##     ChildNeglctSxl    1.000                               1.000    1.000
##     ChildComViolnc    1.000                               1.000    1.000

Joint model predicting DSM

Regular & SAM approach

SAM: Do not report yet, there are issues in the code regarding std.lv = T. In this case, it is setting the variance of age, a significant covariate, lavaan message board https://groups.google.com/g/lavaan/c/vF48T9yrtNU/m/2vXVO5a4BQAJ

model_jptsd <- "
ConflictTrauma =~ htq1_05 + htq1_06  + htq1_17 
Isolation_Loss =~ htq1_19 + htq1_21 + htq1_30_34
ViolentVictimization =~ htq1_7_10 + htq1_8_9 + htq1_11 + htq1_13_18 + htq1_14 + htq1_16 + htq1_20_24 + htq1_22  + htq1_25_to_29 + htq1_23 
Destruction_Injury =~ htq1_04 + htq1_12_36 +  htq1_15 + htq1_32 + htq1_35
WitnessViolence =~ htq1_39 + htq1_37 + htq1_38
htq1_04 ~~ htq1_15 

ChildAbuse =~ ace_4_6 + ace_4_7 + ace_4_8 + ace_5_1 + ace_5_2 + ace_5_3 + ace_5_4 + ace_6_1 + ace_6_3 
ChildNeglectSexual =~ ace_2_1R + ace_2_2R + ace_3_1 + ace_3_2 + ace_4_1 + ace_5_5 + ace_5_6 + ace_5_7 + ace_5_8
ChildComViolence =~ ace_7_1 + ace_7_2 + ace_7_3
ace_3_2 ~~ ace_4_1
ace_2_1R ~~ ace_2_2R 
ace_4_6 ~~  ace_4_7
ace_4_7 ~~  ace_4_8

htq_ptsd_total ~ ConflictTrauma + Isolation_Loss + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual +  ChildComViolence + q102b_guess_age

"
fit_modjptsd <- sem(model_jptsd, data = data,  auto.fix.first = FALSE, std.lv = TRUE)
tj <- fitMeasures(fit_modjptsd, fit.measures = c("npar", "fmin", "chisq", "df", "pvalue", "srmr", "cfi.scaled", "tli.scaled", "rmsea.scaled"))
knitr::kable(tj, caption = "Model fit statistics PTSD", digits = 3)
Model fit statistics PTSD
x
npar 164.00000000
fmin 1.02668126
chisq 5585.14606621
df 994.00000000
pvalue 0.00000000
srmr 0.08598952
cfi.scaled 0.89483306
tli.scaled 0.89049519
rmsea.scaled 0.03641272
summary(fit_modjptsd, fit.measures = TRUE, standardized = TRUE)
## lavaan 0.6.17 ended normally after 47 iterations
## 
##   Estimator                                       DWLS
##   Optimization method                           NLMINB
##   Number of model parameters                       164
## 
##                                                   Used       Total
##   Number of observations                          2720        2965
## 
## Model Test User Model:
##                                               Standard      Scaled
##   Test Statistic                              5585.146    4577.454
##   Degrees of freedom                               994         994
##   P-value (Chi-square)                           0.000       0.000
##   Scaling correction factor                                  1.336
##   Shift parameter                                          398.341
##     simple second-order correction                                
## 
## Model Test Baseline Model:
## 
##   Test statistic                             71752.045   35108.956
##   Degrees of freedom                              1035        1035
##   P-value                                        0.000       0.000
##   Scaling correction factor                                  2.075
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.935       0.895
##   Tucker-Lewis Index (TLI)                       0.932       0.890
##                                                                   
##   Robust Comparative Fit Index (CFI)                            NA
##   Robust Tucker-Lewis Index (TLI)                               NA
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.041       0.036
##   90 Percent confidence interval - lower         0.040       0.035
##   90 Percent confidence interval - upper         0.042       0.037
##   P-value H_0: RMSEA <= 0.050                    1.000       1.000
##   P-value H_0: RMSEA >= 0.080                    0.000       0.000
##                                                                   
##   Robust RMSEA                                                  NA
##   90 Percent confidence interval - lower                        NA
##   90 Percent confidence interval - upper                        NA
##   P-value H_0: Robust RMSEA <= 0.050                            NA
##   P-value H_0: Robust RMSEA >= 0.080                            NA
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.086       0.086
## 
## Parameter Estimates:
## 
##   Parameterization                               Delta
##   Standard errors                           Robust.sem
##   Information                                 Expected
##   Information saturated (h1) model        Unstructured
## 
## Latent Variables:
##                           Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   ConflictTrauma =~                                                            
##     htq1_05                  0.754    0.022   33.707    0.000    0.754    0.754
##     htq1_06                  0.908    0.026   35.558    0.000    0.908    0.908
##     htq1_17                  0.857    0.021   41.138    0.000    0.857    0.857
##   Isolation_Loss =~                                                            
##     htq1_19                  0.878    0.026   34.324    0.000    0.878    0.878
##     htq1_21                  0.955    0.026   36.447    0.000    0.955    0.955
##     htq1_30_34               0.334    0.061    5.440    0.000    0.334    0.334
##   ViolentVictimization =~                                                      
##     htq1_7_10                0.587    0.033   17.906    0.000    0.587    0.587
##     htq1_8_9                 0.561    0.044   12.703    0.000    0.561    0.561
##     htq1_11                  0.744    0.024   30.970    0.000    0.744    0.744
##     htq1_13_18               0.582    0.039   14.927    0.000    0.582    0.582
##     htq1_14                  0.781    0.024   32.679    0.000    0.781    0.781
##     htq1_16                  0.524    0.029   18.062    0.000    0.524    0.524
##     htq1_20_24               0.641    0.042   15.369    0.000    0.641    0.641
##     htq1_22                  0.665    0.033   19.977    0.000    0.665    0.665
##     htq1_25_to_29            0.559    0.040   14.069    0.000    0.559    0.559
##     htq1_23                  0.546    0.049   11.135    0.000    0.546    0.546
##   Destruction_Injury =~                                                        
##     htq1_04                  0.583    0.027   21.853    0.000    0.583    0.583
##     htq1_12_36               0.704    0.026   26.799    0.000    0.704    0.704
##     htq1_15                  0.653    0.025   26.050    0.000    0.653    0.653
##     htq1_32                  0.619    0.026   24.165    0.000    0.619    0.619
##     htq1_35                  0.685    0.026   26.314    0.000    0.685    0.685
##   WitnessViolence =~                                                           
##     htq1_39                  0.701    0.020   34.922    0.000    0.701    0.701
##     htq1_37                  0.847    0.015   55.611    0.000    0.847    0.847
##     htq1_38                  0.909    0.015   62.133    0.000    0.909    0.909
##   ChildAbuse =~                                                                
##     ace_4_6                  0.681    0.015   45.038    0.000    0.681    0.681
##     ace_4_7                  0.697    0.017   41.407    0.000    0.697    0.697
##     ace_4_8                  0.790    0.016   48.677    0.000    0.790    0.790
##     ace_5_1                  0.691    0.015   46.063    0.000    0.691    0.691
##     ace_5_2                  0.604    0.022   27.108    0.000    0.604    0.604
##     ace_5_3                  0.607    0.016   37.212    0.000    0.607    0.607
##     ace_5_4                  0.670    0.017   38.645    0.000    0.670    0.670
##     ace_6_1                  0.603    0.019   32.462    0.000    0.603    0.603
##     ace_6_3                  0.559    0.018   30.477    0.000    0.559    0.559
##   ChildNeglectSexual =~                                                        
##     ace_2_1R                 0.307    0.035    8.694    0.000    0.307    0.307
##     ace_2_2R                 0.347    0.034   10.299    0.000    0.347    0.347
##     ace_3_1                  0.544    0.051   10.638    0.000    0.544    0.544
##     ace_3_2                  0.576    0.086    6.679    0.000    0.576    0.576
##     ace_4_1                  0.451    0.077    5.848    0.000    0.451    0.451
##     ace_5_5                  0.857    0.033   26.231    0.000    0.857    0.857
##     ace_5_6                  0.802    0.047   17.099    0.000    0.802    0.802
##     ace_5_7                  0.558    0.046   12.083    0.000    0.558    0.558
##     ace_5_8                  0.618    0.063    9.765    0.000    0.618    0.618
##   ChildComViolence =~                                                          
##     ace_7_1                  0.691    0.024   28.763    0.000    0.691    0.691
##     ace_7_2                  0.784    0.019   41.046    0.000    0.784    0.784
##     ace_7_3                  0.870    0.019   45.771    0.000    0.870    0.870
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   htq_ptsd_total ~                                                      
##     ConflictTrauma   -0.015    0.032   -0.451    0.652   -0.015   -0.027
##     Isolation_Loss   -0.001    0.023   -0.039    0.969   -0.001   -0.002
##     ViolentVctmztn    0.106    0.043    2.472    0.013    0.106    0.198
##     Destrctn_Injry    0.097    0.043    2.235    0.025    0.097    0.181
##     WitnessViolenc   -0.023    0.032   -0.719    0.472   -0.023   -0.043
##     ChildAbuse        0.113    0.020    5.789    0.000    0.113    0.212
##     ChildNeglctSxl    0.052    0.027    1.883    0.060    0.052    0.097
##     ChildComViolnc    0.032    0.019    1.696    0.090    0.032    0.060
##     q102b_guess_ag    0.018    0.002   10.054    0.000    0.018    0.193
## 
## Covariances:
##                           Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##  .htq1_04 ~~                                                                   
##    .htq1_15                  0.373    0.028   13.241    0.000    0.373    0.605
##  .ace_3_2 ~~                                                                   
##    .ace_4_1                  0.645    0.076    8.458    0.000    0.645    0.884
##  .ace_2_1R ~~                                                                  
##    .ace_2_2R                 0.350    0.025   14.210    0.000    0.350    0.393
##  .ace_4_6 ~~                                                                   
##    .ace_4_7                  0.258    0.017   15.412    0.000    0.258    0.491
##  .ace_4_7 ~~                                                                   
##    .ace_4_8                  0.235    0.020   11.875    0.000    0.235    0.534
##   ConflictTrauma ~~                                                            
##     Isolation_Loss           0.408    0.040   10.127    0.000    0.408    0.408
##     ViolentVctmztn           0.305    0.036    8.472    0.000    0.305    0.305
##     Destrctn_Injry           0.712    0.028   25.059    0.000    0.712    0.712
##     WitnessViolenc           0.523    0.026   19.770    0.000    0.523    0.523
##     ChildAbuse               0.086    0.030    2.833    0.005    0.086    0.086
##     ChildNeglctSxl          -0.078    0.044   -1.784    0.074   -0.078   -0.078
##     ChildComViolnc           0.288    0.031    9.311    0.000    0.288    0.288
##   Isolation_Loss ~~                                                            
##     ViolentVctmztn           0.479    0.036   13.333    0.000    0.479    0.479
##     Destrctn_Injry           0.582    0.033   17.638    0.000    0.582    0.582
##     WitnessViolenc           0.518    0.031   16.567    0.000    0.518    0.518
##     ChildAbuse               0.250    0.031    8.025    0.000    0.250    0.250
##     ChildNeglctSxl           0.323    0.047    6.908    0.000    0.323    0.323
##     ChildComViolnc           0.115    0.036    3.181    0.001    0.115    0.115
##   ViolentVictimization ~~                                                      
##     Destrctn_Injry           0.647    0.030   21.663    0.000    0.647    0.647
##     WitnessViolenc           0.734    0.023   31.702    0.000    0.734    0.734
##     ChildAbuse               0.524    0.027   19.489    0.000    0.524    0.524
##     ChildNeglctSxl           0.610    0.038   16.062    0.000    0.610    0.610
##     ChildComViolnc           0.083    0.034    2.457    0.014    0.083    0.083
##   Destruction_Injury ~~                                                        
##     WitnessViolenc           0.730    0.023   31.981    0.000    0.730    0.730
##     ChildAbuse               0.301    0.027   10.954    0.000    0.301    0.301
##     ChildNeglctSxl           0.236    0.041    5.806    0.000    0.236    0.236
##     ChildComViolnc           0.136    0.030    4.526    0.000    0.136    0.136
##   WitnessViolence ~~                                                           
##     ChildAbuse               0.324    0.025   12.883    0.000    0.324    0.324
##     ChildNeglctSxl           0.348    0.036    9.633    0.000    0.348    0.348
##     ChildComViolnc           0.232    0.028    8.328    0.000    0.232    0.232
##   ChildAbuse ~~                                                                
##     ChildNeglctSxl           0.464    0.035   13.429    0.000    0.464    0.464
##     ChildComViolnc           0.417    0.022   19.109    0.000    0.417    0.417
##   ChildNeglectSexual ~~                                                        
##     ChildComViolnc           0.044    0.038    1.155    0.248    0.044    0.044
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .htq_ptsd_total    1.885    0.011  176.658    0.000    1.885    3.528
## 
## Thresholds:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##     htq1_05|t1       -0.694    0.026  -26.374    0.000   -0.694   -0.694
##     htq1_06|t1       -1.325    0.034  -39.520    0.000   -1.325   -1.325
##     htq1_17|t1       -0.888    0.028  -31.800    0.000   -0.888   -0.888
##     htq1_19|t1        1.137    0.031   36.709    0.000    1.137    1.137
##     htq1_21|t1        1.206    0.032   37.940    0.000    1.206    1.206
##     htq1_30_34|t1     1.809    0.054   33.662    0.000    1.809    1.809
##     htq1_7_10|t1      1.369    0.036   37.895    0.000    1.369    1.369
##     htq1_8_9|t1       1.771    0.048   37.109    0.000    1.771    1.771
##     htq1_11|t1        1.035    0.031   33.444    0.000    1.035    1.035
##     htq1_13_18|t1     1.679    0.043   38.791    0.000    1.679    1.679
##     htq1_14|t1        1.244    0.037   33.899    0.000    1.244    1.244
##     htq1_16|t1        0.994    0.029   33.727    0.000    0.994    0.994
##     htq1_20_24|t1     1.903    0.051   37.145    0.000    1.903    1.903
##     htq1_22|t1        1.477    0.039   38.078    0.000    1.477    1.477
##     htq1_25_t_29|1    1.636    0.040   40.547    0.000    1.636    1.636
##     htq1_23|t1        1.904    0.050   37.864    0.000    1.904    1.904
##     htq1_04|t1       -0.531    0.026  -20.796    0.000   -0.531   -0.531
##     htq1_12_36|t1     0.990    0.029   33.995    0.000    0.990    0.990
##     htq1_15|t1       -0.026    0.024   -1.087    0.277   -0.026   -0.026
##     htq1_32|t1        0.682    0.026   25.766    0.000    0.682    0.682
##     htq1_35|t1        0.895    0.028   31.905    0.000    0.895    0.895
##     htq1_39|t1        0.426    0.025   17.088    0.000    0.426    0.426
##     htq1_37|t1       -0.047    0.024   -1.931    0.053   -0.047   -0.047
##     htq1_38|t1        0.143    0.025    5.832    0.000    0.143    0.143
##     ace_4_6|t1       -0.487    0.025  -19.388    0.000   -0.487   -0.487
##     ace_4_6|t2       -0.340    0.025  -13.848    0.000   -0.340   -0.340
##     ace_4_6|t3        0.333    0.025   13.590    0.000    0.333    0.333
##     ace_4_7|t1       -0.136    0.024   -5.657    0.000   -0.136   -0.136
##     ace_4_7|t2        0.039    0.024    1.631    0.103    0.039    0.039
##     ace_4_7|t3        0.575    0.026   22.512    0.000    0.575    0.575
##     ace_4_8|t1        0.447    0.025   17.913    0.000    0.447    0.447
##     ace_4_8|t2        0.625    0.026   24.151    0.000    0.625    0.625
##     ace_4_8|t3        1.044    0.030   35.353    0.000    1.044    1.044
##     ace_5_1|t1       -0.262    0.024  -10.757    0.000   -0.262   -0.262
##     ace_5_1|t2       -0.140    0.024   -5.820    0.000   -0.140   -0.140
##     ace_5_1|t3        0.342    0.025   13.936    0.000    0.342    0.342
##     ace_5_2|t1        0.667    0.026   25.547    0.000    0.667    0.667
##     ace_5_2|t2        0.832    0.027   30.422    0.000    0.832    0.832
##     ace_5_2|t3        1.353    0.034   39.738    0.000    1.353    1.353
##     ace_5_3|t1       -0.667    0.026  -25.540    0.000   -0.667   -0.667
##     ace_5_3|t2       -0.514    0.025  -20.322    0.000   -0.514   -0.514
##     ace_5_3|t3        0.216    0.024    8.930    0.000    0.216    0.216
##     ace_5_4|t1        0.340    0.025   13.829    0.000    0.340    0.340
##     ace_5_4|t2        0.507    0.025   20.102    0.000    0.507    0.507
##     ace_5_4|t3        0.966    0.029   33.738    0.000    0.966    0.966
##     ace_6_1|t1       -0.164    0.024   -6.776    0.000   -0.164   -0.164
##     ace_6_1|t2       -0.115    0.024   -4.777    0.000   -0.115   -0.115
##     ace_6_1|t3        0.245    0.024   10.066    0.000    0.245    0.245
##     ace_6_3|t1       -0.297    0.024  -12.169    0.000   -0.297   -0.297
##     ace_6_3|t2       -0.192    0.024   -7.917    0.000   -0.192   -0.192
##     ace_6_3|t3        0.404    0.025   16.293    0.000    0.404    0.404
##     ace_2_1R|t1       0.232    0.024    9.553    0.000    0.232    0.232
##     ace_2_1R|t2       0.867    0.028   31.468    0.000    0.867    0.867
##     ace_2_1R|t3       1.448    0.036   40.351    0.000    1.448    1.448
##     ace_2_1R|t4       2.018    0.054   37.437    0.000    2.018    2.018
##     ace_2_2R|t1       0.014    0.024    0.597    0.550    0.014    0.014
##     ace_2_2R|t2       0.622    0.026   24.104    0.000    0.622    0.622
##     ace_2_2R|t3       1.101    0.030   36.484    0.000    1.101    1.101
##     ace_2_2R|t4       1.697    0.042   40.371    0.000    1.697    1.697
##     ace_3_1|t1        1.563    0.039   40.408    0.000    1.563    1.563
##     ace_3_2|t1        2.146    0.061   35.398    0.000    2.146    2.146
##     ace_4_1|t1        2.012    0.054   37.334    0.000    2.012    2.012
##     ace_5_5|t1        1.525    0.038   39.980    0.000    1.525    1.525
##     ace_5_6|t1        1.960    0.053   37.239    0.000    1.960    1.960
##     ace_5_7|t1        1.609    0.040   40.583    0.000    1.609    1.609
##     ace_5_8|t1        2.178    0.062   35.096    0.000    2.178    2.178
##     ace_7_1|t1       -2.083    0.057  -36.807    0.000   -2.083   -2.083
##     ace_7_1|t2       -1.878    0.048  -39.460    0.000   -1.878   -1.878
##     ace_7_1|t3       -0.838    0.027  -30.487    0.000   -0.838   -0.838
##     ace_7_2|t1       -1.651    0.040  -40.907    0.000   -1.651   -1.651
##     ace_7_2|t2       -1.332    0.033  -39.802    0.000   -1.332   -1.332
##     ace_7_2|t3       -0.451    0.025  -17.949    0.000   -0.451   -0.451
##     ace_7_3|t1       -1.028    0.029  -35.129    0.000   -1.028   -1.028
##     ace_7_3|t2       -0.869    0.028  -31.461    0.000   -0.869   -0.869
##     ace_7_3|t3       -0.156    0.024   -6.462    0.000   -0.156   -0.156
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .htq1_05           0.432                               0.432    0.432
##    .htq1_06           0.176                               0.176    0.176
##    .htq1_17           0.265                               0.265    0.265
##    .htq1_19           0.229                               0.229    0.229
##    .htq1_21           0.087                               0.087    0.087
##    .htq1_30_34        0.889                               0.889    0.889
##    .htq1_7_10         0.656                               0.656    0.656
##    .htq1_8_9          0.686                               0.686    0.686
##    .htq1_11           0.447                               0.447    0.447
##    .htq1_13_18        0.662                               0.662    0.662
##    .htq1_14           0.390                               0.390    0.390
##    .htq1_16           0.726                               0.726    0.726
##    .htq1_20_24        0.589                               0.589    0.589
##    .htq1_22           0.558                               0.558    0.558
##    .htq1_25_to_29     0.687                               0.687    0.687
##    .htq1_23           0.702                               0.702    0.702
##    .htq1_04           0.661                               0.661    0.661
##    .htq1_12_36        0.505                               0.505    0.505
##    .htq1_15           0.574                               0.574    0.574
##    .htq1_32           0.617                               0.617    0.617
##    .htq1_35           0.531                               0.531    0.531
##    .htq1_39           0.509                               0.509    0.509
##    .htq1_37           0.283                               0.283    0.283
##    .htq1_38           0.174                               0.174    0.174
##    .ace_4_6           0.536                               0.536    0.536
##    .ace_4_7           0.514                               0.514    0.514
##    .ace_4_8           0.375                               0.375    0.375
##    .ace_5_1           0.522                               0.522    0.522
##    .ace_5_2           0.635                               0.635    0.635
##    .ace_5_3           0.632                               0.632    0.632
##    .ace_5_4           0.552                               0.552    0.552
##    .ace_6_1           0.636                               0.636    0.636
##    .ace_6_3           0.687                               0.687    0.687
##    .ace_2_1R          0.906                               0.906    0.906
##    .ace_2_2R          0.879                               0.879    0.879
##    .ace_3_1           0.704                               0.704    0.704
##    .ace_3_2           0.668                               0.668    0.668
##    .ace_4_1           0.797                               0.797    0.797
##    .ace_5_5           0.266                               0.266    0.266
##    .ace_5_6           0.358                               0.358    0.358
##    .ace_5_7           0.689                               0.689    0.689
##    .ace_5_8           0.617                               0.617    0.617
##    .ace_7_1           0.522                               0.522    0.522
##    .ace_7_2           0.385                               0.385    0.385
##    .ace_7_3           0.243                               0.243    0.243
##    .htq_ptsd_total    0.198    0.006   30.723    0.000    0.198    0.695
##     ConflictTrauma    1.000                               1.000    1.000
##     Isolation_Loss    1.000                               1.000    1.000
##     ViolentVctmztn    1.000                               1.000    1.000
##     Destrctn_Injry    1.000                               1.000    1.000
##     WitnessViolenc    1.000                               1.000    1.000
##     ChildAbuse        1.000                               1.000    1.000
##     ChildNeglctSxl    1.000                               1.000    1.000
##     ChildComViolnc    1.000                               1.000    1.000
# fit <- sam(model_jptsd, data = data, cmd = "sem", mm.list = list("ConflictTrauma", "Isolation_Loss" , "ViolentVictimization", "Destruction_Injury", "WitnessViolence", "ChildAbuse", "ChildNeglectSexual", "ChildComViolence"), std.lv = T, auto.fix.first = F) 
# summary(fit, fit.measures = TRUE, standardized = TRUE)

reg <- parameterestimates(fit_modjptsd)
#sam <- parameterestimates(fit)
reg %>% filter(op == "~")
##              lhs op                  rhs    est    se      z pvalue ci.lower
## 1 htq_ptsd_total  ~       ConflictTrauma -0.015 0.032 -0.451  0.652   -0.077
## 2 htq_ptsd_total  ~       Isolation_Loss -0.001 0.023 -0.039  0.969   -0.046
## 3 htq_ptsd_total  ~ ViolentVictimization  0.106 0.043  2.472  0.013    0.022
## 4 htq_ptsd_total  ~   Destruction_Injury  0.097 0.043  2.235  0.025    0.012
## 5 htq_ptsd_total  ~      WitnessViolence -0.023 0.032 -0.719  0.472   -0.085
## 6 htq_ptsd_total  ~           ChildAbuse  0.113 0.020  5.789  0.000    0.075
## 7 htq_ptsd_total  ~   ChildNeglectSexual  0.052 0.027  1.883  0.060   -0.002
## 8 htq_ptsd_total  ~     ChildComViolence  0.032 0.019  1.696  0.090   -0.005
## 9 htq_ptsd_total  ~      q102b_guess_age  0.018 0.002 10.054  0.000    0.014
##   ci.upper
## 1    0.048
## 2    0.044
## 3    0.190
## 4    0.181
## 5    0.039
## 6    0.152
## 7    0.106
## 8    0.069
## 9    0.021
#sam %>% filter(op == "~")

Comparing invariance across males/females

Group model where everything is free to vary doesn’t run, trying alternative by constraining all parameters to be equal and then relaxing regressions. A model where regressions are “free” fits better than a model where regressions are the same.

# fit_modjptsdg <- sem(model_jptsd, data = data,  auto.fix.first = FALSE, std.lv = TRUE, group = "respondent_cat")
# fit_modjptsdgr <- sem(model_jptsd, data = data,  auto.fix.first = FALSE, std.lv = TRUE, group = "respondent_cat", group.equal = "regressions")

fit_modjptsdC <- sem(model_jptsd, data = data,  auto.fix.first = FALSE, std.lv = TRUE, group = "respondent_cat", group.equal = c("loadings", "intercepts", "means", "thresholds", "regressions", "residuals", "residual.covariances", "lv.variances", "lv.covariances"))

fit_modjptsdR <- sem(model_jptsd, data = data,  auto.fix.first = FALSE, std.lv = TRUE, group = "respondent_cat", group.equal = c("loadings", "intercepts", "means", "thresholds","residuals", "residual.covariances", "lv.variances", "lv.covariances"))

lavTestLRT(fit_modjptsdC, fit_modjptsdR, method = "satorra.bentler.2001")
## 
## Scaled Chi-Squared Difference Test (method = "satorra.bentler.2001")
## 
## lavaan NOTE:
##     The "Chisq" column contains standard test statistics, not the
##     robust test that should be reported per model. A robust difference
##     test is a function of two standard (not robust) statistics.
##  
##                 Df AIC BIC Chisq Chisq diff Df diff Pr(>Chisq)    
## fit_modjptsdR 2098         12488                                  
## fit_modjptsdC 2107         12740     33.746       9 0.00009897 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
out1 <- compareFit(fit_modjptsdC, fit_modjptsdR, nested = T)
summary(out1)
## ################### Nested Model Comparison #########################
## 
## Scaled Chi-Squared Difference Test (method = "satorra.2000")
## 
## lavaan NOTE:
##     The "Chisq" column contains standard test statistics, not the
##     robust test that should be reported per model. A robust difference
##     test is a function of two standard (not robust) statistics.
##  
##                 Df AIC BIC Chisq Chisq diff Df diff           Pr(>Chisq)    
## fit_modjptsdR 2098         12488                                            
## fit_modjptsdC 2107         12740     88.311       9 0.000000000000003551 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## ####################### Model Fit Indices ###########################
##               chisq.scaled df.scaled pvalue.scaled rmsea.scaled cfi.scaled
## fit_modjptsdR    7579.580†      2098          .000        .044†      .813†
## fit_modjptsdC    7642.827       2107          .000        .044       .811 
##               tli.scaled  srmr
## fit_modjptsdR      .815† .171†
## fit_modjptsdC      .814  .171 
## 
## ################## Differences in Fit Indices #######################
##                               df.scaled rmsea.scaled cfi.scaled tli.scaled srmr
## fit_modjptsdC - fit_modjptsdR         9            0     -0.002     -0.001    0
females <- data %>% filter(respondent_cat == 0)
males <- data %>% filter(respondent_cat == 1)
# 
# fit_modjptsdf <- sem(model_jptsd, data = females,  auto.fix.first = FALSE, std.lv = TRUE)
# summary(fit_modjptsdf, fit.measures = TRUE, standardized = TRUE)

#fitfL <- sam(model_jptsd, data = females, cmd = "sem", mm.list = list("ConflictTrauma", "Isolation_Loss" , "ViolentVictimization", "Destruction_Injury", "WitnessViolence", "ChildAbuse", "ChildNeglectSexual", "ChildComViolence"), std.lv = T, auto.fix.first = F)
#summary(fitfL, fit.measures = TRUE, standardized = TRUE)

reg <- parameterestimates(fit_modjptsdf)
#sam<- parameterestimates(fitfL)
reg %>% filter(op == "~")
#sam %>% filter(op == "~")

#fitm <- sam(model_jptsd, data = males, cmd = "sem", mm.list = list("ConflictTrauma", "Isolation_Loss" , "ViolentVictimization", "Destruction_Injury", "WitnessViolence", "ChildAbuse", "ChildNeglectSexual", "ChildComViolence"),mm.args = list(std.lv = T, auto.fix.first = F))
#summary(fitm, fit.measures = TRUE, standardized = TRUE)

#fitmL <- sam(model_jptsd, data = males, cmd = "sem", mm.list = list("ConflictTrauma", "Isolation_Loss" , "ViolentVictimization", "Destruction_Injury", "WitnessViolence", "ChildAbuse", "ChildNeglectSexual", "ChildComViolence"), std.lv = T, auto.fix.first = F)
#summary(fitmL, fit.measures = TRUE, standardized = TRUE)
reg <- parameterestimates(fitm)
#sam<- parameterestimates(fitmL)
reg %>% filter(op == "~")
#sam %>% filter(op == "~")

# fem <- parameterestimates(fitfL)
# mal <- parameterestimates(fitmL)
# t1 <- fem %>% filter(op == "~")
# knitr::kable(t1, caption = "Regressions (SAM) in Pregnant Women", digits = 3)
# t2 <- mal %>% filter(op == "~")
# knitr::kable(t2, caption = "Regressions (SAM) in Husbands", digits = 3)

Final Regression model

With extracted factor scores

females <- dataf %>% filter(respondent_cat == 0)

model_obs <- "
htq_ptsd_total ~ ConflictTrauma + Isolation_Loss + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + ChildComViolence + q102b_guess_age

ConflictTrauma ~~  Isolation_Loss  + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + ChildComViolence
Isolation_Loss ~~ ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + ChildComViolence
ViolentVictimization ~~ Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual
ViolentVictimization~~0*ChildComViolence
Destruction_Injury ~~ WitnessViolence + ChildAbuse + ChildComViolence
WitnessViolence ~~ ChildAbuse + ChildNeglectSexual + ChildComViolence
ChildAbuse ~~ 0*ChildNeglectSexual
ChildAbuse ~~ ChildComViolence
ChildNeglectSexual ~~ 0*ChildComViolence
ChildNeglectSexual ~~ 0*Destruction_Injury

ConflictTrauma ~ 0*1
Isolation_Loss ~ 0*1 
ViolentVictimization ~ 0*1 
Destruction_Injury ~ 0*1
WitnessViolence ~ 0*1
ChildAbuse ~0*1 
ChildNeglectSexual ~0*1 
ChildComViolence ~0*1 
"
fit_obs <- sem(model_obs, data = dataf,estimator = "ML", missing = "FIML.x", meanstructure = T, fixed.x = F)
summary(fit_obs, fit.measures = TRUE, standardized = TRUE, rsquare = T)
## lavaan 0.6.17 ended normally after 46 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        45
## 
##   Number of observations                          2965
##   Number of missing patterns                         7
## 
## Model Test User Model:
##                                                       
##   Test statistic                              1443.645
##   Degrees of freedom                                20
##   P-value (Chi-square)                           0.000
## 
## Model Test Baseline Model:
## 
##   Test statistic                             12386.842
##   Degrees of freedom                                45
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.885
##   Tucker-Lewis Index (TLI)                       0.740
##                                                       
##   Robust Comparative Fit Index (CFI)             0.884
##   Robust Tucker-Lewis Index (TLI)                0.739
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)             -39416.265
##   Loglikelihood unrestricted model (H1)     -38694.443
##                                                       
##   Akaike (AIC)                               78922.531
##   Bayesian (BIC)                             79192.289
##   Sample-size adjusted Bayesian (SABIC)      79049.307
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.155
##   90 Percent confidence interval - lower         0.148
##   90 Percent confidence interval - upper         0.162
##   P-value H_0: RMSEA <= 0.050                    0.000
##   P-value H_0: RMSEA >= 0.080                    1.000
##                                                       
##   Robust RMSEA                                   0.156
##   90 Percent confidence interval - lower         0.149
##   90 Percent confidence interval - upper         0.163
##   P-value H_0: Robust RMSEA <= 0.050             0.000
##   P-value H_0: Robust RMSEA >= 0.080             1.000
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.115
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Observed
##   Observed information based on                Hessian
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   htq_ptsd_total ~                                                      
##     ConflictTrauma    0.007    0.013    0.540    0.589    0.007    0.014
##     Isolation_Loss    0.034    0.011    3.095    0.002    0.034    0.066
##     ViolentVctmztn    0.088    0.016    5.503    0.000    0.088    0.166
##     Destrctn_Injry    0.043    0.018    2.433    0.015    0.043    0.083
##     WitnessViolenc    0.009    0.016    0.573    0.566    0.009    0.017
##     ChildAbuse        0.126    0.011   11.068    0.000    0.126    0.243
##     ChildNeglctSxl    0.049    0.011    4.620    0.000    0.049    0.094
##     ChildComViolnc    0.015    0.010    1.420    0.155    0.015    0.028
##     q102b_guess_ag    0.006    0.002    4.001    0.000    0.006    0.073
## 
## Covariances:
##                           Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   ConflictTrauma ~~                                                            
##     Isolation_Loss           0.420    0.020   20.929    0.000    0.420    0.422
##     ViolentVctmztn           0.309    0.019   16.529    0.000    0.309    0.317
##     Destrctn_Injry           0.718    0.023   31.727    0.000    0.718    0.714
##     WitnessViolenc           0.515    0.020   25.138    0.000    0.515    0.520
##     ChildAbuse               0.163    0.020    8.263    0.000    0.163    0.163
##     ChildNeglctSxl          -0.101    0.015   -6.565    0.000   -0.101   -0.100
##     ChildComViolnc           0.171    0.018    9.570    0.000    0.171    0.169
##   Isolation_Loss ~~                                                            
##     ViolentVctmztn           0.468    0.019   24.429    0.000    0.468    0.490
##     Destrctn_Injry           0.569    0.021   26.980    0.000    0.569    0.578
##     WitnessViolenc           0.512    0.020   25.698    0.000    0.512    0.529
##     ChildAbuse               0.120    0.020    6.077    0.000    0.120    0.123
##     ChildNeglctSxl           0.096    0.018    5.399    0.000    0.096    0.097
##     ChildComViolnc           0.048    0.016    2.992    0.003    0.048    0.049
##   ViolentVictimization ~~                                                      
##     Destrctn_Injry           0.640    0.021   30.073    0.000    0.640    0.664
##     WitnessViolenc           0.711    0.021   33.239    0.000    0.711    0.750
##     ChildAbuse               0.223    0.018   12.270    0.000    0.223    0.233
##     ChildNeglctSxl           0.174    0.016   10.977    0.000    0.174    0.180
##     ChildComViolnc           0.000                               0.000    0.000
##   Destruction_Injury ~~                                                        
##     WitnessViolenc           0.701    0.022   31.724    0.000    0.701    0.718
##     ChildAbuse               0.218    0.018   12.153    0.000    0.218    0.220
##     ChildComViolnc           0.079    0.014    5.740    0.000    0.079    0.079
##   WitnessViolence ~~                                                           
##     ChildAbuse               0.216    0.019   11.494    0.000    0.216    0.222
##     ChildNeglctSxl           0.084    0.015    5.593    0.000    0.084    0.085
##     ChildComViolnc           0.103    0.012    8.435    0.000    0.103    0.105
##   ChildAbuse ~~                                                                
##     ChildNeglctSxl           0.000                               0.000    0.000
##     ChildComViolnc           0.394    0.019   20.274    0.000    0.394    0.396
##   ChildNeglectSexual ~~                                                        
##     ChildComViolnc           0.000                               0.000    0.000
##   Destruction_Injury ~~                                                        
##     ChildNeglctSxl           0.000                               0.000    0.000
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##     ConflictTrauma    0.000                               0.000    0.000
##     Isolation_Loss    0.000                               0.000    0.000
##     ViolentVctmztn    0.000                               0.000    0.000
##     Destrctn_Injry    0.000                               0.000    0.000
##     WitnessViolenc    0.000                               0.000    0.000
##     ChildAbuse        0.000                               0.000    0.000
##     ChildNeglctSxl    0.000                               0.000    0.000
##     ChildComViolnc    0.000                               0.000    0.000
##    .htq_ptsd_total    1.882    0.009  216.705    0.000    1.882    3.651
##     q102b_guess_ag   -0.000    0.107   -0.000    1.000   -0.000   -0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .htq_ptsd_total    0.211    0.006   37.350    0.000    0.211    0.793
##     ConflictTrauma    1.019    0.027   37.800    0.000    1.019    1.000
##     Isolation_Loss    0.974    0.025   38.802    0.000    0.974    1.000
##     ViolentVctmztn    0.934    0.024   39.613    0.000    0.934    1.000
##     Destrctn_Injry    0.993    0.026   38.601    0.000    0.993    1.000
##     WitnessViolenc    0.960    0.025   38.825    0.000    0.960    1.000
##     ChildAbuse        0.987    0.025   38.768    0.000    0.987    1.000
##     ChildNeglctSxl    1.000    0.026   38.047    0.000    1.000    1.000
##     ChildComViolnc    1.000    0.026   38.063    0.000    1.000    1.000
##     q102b_guess_ag   34.098    0.886   38.503    0.000   34.098    1.000
## 
## R-Square:
##                    Estimate
##     htq_ptsd_total    0.207
fit_obsg <- sem(model_obs, data = dataf,estimator = "ML", missing = "FIML.x", meanstructure = T, fixed.x = F, group = "respondent_cat")
#summary(fit_obsg, fit.measures = TRUE, standardized = TRUE)

out1 <- compareFit(fit_obs,fit_obsg, nested = F)
summary(out1)
## ####################### Model Fit Indices ###########################
##              chisq df pvalue rmsea   cfi   tli  srmr        aic        bic
## fit_obs  1443.645† 20   .000 .155† .885† .740† .115† 78922.531  79192.289 
## fit_obsg 2467.582  40   .000 .202  .778  .500  .184  77250.674† 77790.191†
fit_obsgr <- sem(model_obs, data = dataf,estimator = "ML", missing = "FIML.x", meanstructure = T, fixed.x = F, group = "respondent_cat", group.equal = "regressions")

out1 <- compareFit(fit_obsgr,fit_obsg, nested = T)
summary(out1)
## ################### Nested Model Comparison #########################
## 
## Chi-Squared Difference Test
## 
##           Df   AIC   BIC  Chisq Chisq diff    RMSEA Df diff         Pr(>Chisq)
## fit_obsg  40 77251 77790 2467.6                                               
## fit_obsgr 49 77311 77797 2546.3     78.698 0.072275       9 0.0000000000002931
##              
## fit_obsg     
## fit_obsgr ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## ####################### Model Fit Indices ###########################
##               chisq df pvalue rmsea   cfi   tli  srmr        aic        bic
## fit_obsg  2467.582† 40   .000 .202  .778† .500  .184† 77250.674† 77790.191†
## fit_obsgr 2546.279  49   .000 .185† .771  .580† .185  77311.372  77796.937 
## 
## ################## Differences in Fit Indices #######################
##                      df  rmsea    cfi  tli  srmr    aic   bic
## fit_obsgr - fit_obsg  9 -0.017 -0.006 0.08 0.001 60.698 6.746
summary(fit_obsg, fit.measures = TRUE, standardized = TRUE, rsquare = T)
## lavaan 0.6.17 ended normally after 85 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        90
## 
##   Number of observations per group:                   
##     0                                             2323
##     1                                              642
##   Number of missing patterns per group:               
##     0                                                6
##     1                                                6
## 
## Model Test User Model:
##                                                       
##   Test statistic                              2467.582
##   Degrees of freedom                                40
##   P-value (Chi-square)                           0.000
##   Test statistic for each group:
##     0                                         1409.370
##     1                                         1058.212
## 
## Model Test Baseline Model:
## 
##   Test statistic                             11007.823
##   Degrees of freedom                                90
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.778
##   Tucker-Lewis Index (TLI)                       0.500
##                                                       
##   Robust Comparative Fit Index (CFI)             0.778
##   Robust Tucker-Lewis Index (TLI)                0.500
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)             -38535.337
##   Loglikelihood unrestricted model (H1)     -37301.546
##                                                       
##   Akaike (AIC)                               77250.674
##   Bayesian (BIC)                             77790.191
##   Sample-size adjusted Bayesian (SABIC)      77504.227
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.202
##   90 Percent confidence interval - lower         0.196
##   90 Percent confidence interval - upper         0.209
##   P-value H_0: RMSEA <= 0.050                    0.000
##   P-value H_0: RMSEA >= 0.080                    1.000
##                                                       
##   Robust RMSEA                                   0.204
##   90 Percent confidence interval - lower         0.197
##   90 Percent confidence interval - upper         0.211
##   P-value H_0: Robust RMSEA <= 0.050             0.000
##   P-value H_0: Robust RMSEA >= 0.080             1.000
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.184
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Observed
##   Observed information based on                Hessian
## 
## 
## Group 1 [0]:
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   htq_ptsd_total ~                                                      
##     ConflictTrauma   -0.008    0.016   -0.484    0.628   -0.008   -0.015
##     Isolation_Loss    0.063    0.014    4.640    0.000    0.063    0.120
##     ViolentVctmztn    0.086    0.022    3.921    0.000    0.086    0.130
##     Destrctn_Injry    0.048    0.021    2.281    0.023    0.048    0.090
##     WitnessViolenc    0.013    0.017    0.737    0.461    0.013    0.023
##     ChildAbuse        0.101    0.013    7.695    0.000    0.101    0.192
##     ChildNeglctSxl    0.083    0.014    6.146    0.000    0.083    0.146
##     ChildComViolnc   -0.006    0.011   -0.562    0.574   -0.006   -0.013
##     q102b_guess_ag    0.009    0.002    4.440    0.000    0.009    0.087
## 
## Covariances:
##                           Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   ConflictTrauma ~~                                                            
##     Isolation_Loss           0.439    0.022   20.416    0.000    0.439    0.466
##     ViolentVctmztn           0.250    0.016   15.329    0.000    0.250    0.331
##     Destrctn_Injry           0.666    0.023   28.483    0.000    0.666    0.722
##     WitnessViolenc           0.489    0.021   23.180    0.000    0.489    0.541
##     ChildAbuse               0.125    0.021    5.892    0.000    0.125    0.133
##     ChildNeglctSxl          -0.066    0.015   -4.441    0.000   -0.066   -0.075
##     ChildComViolnc           0.195    0.020    9.803    0.000    0.195    0.197
##   Isolation_Loss ~~                                                            
##     ViolentVctmztn           0.385    0.017   22.396    0.000    0.385    0.513
##     Destrctn_Injry           0.579    0.022   25.776    0.000    0.579    0.631
##     WitnessViolenc           0.490    0.021   23.413    0.000    0.490    0.545
##     ChildAbuse               0.118    0.021    5.543    0.000    0.118    0.126
##     ChildNeglctSxl           0.090    0.017    5.362    0.000    0.090    0.104
##     ChildComViolnc           0.083    0.018    4.630    0.000    0.083    0.084
##   ViolentVictimization ~~                                                      
##     Destrctn_Injry           0.486    0.018   26.623    0.000    0.486    0.661
##     WitnessViolenc           0.503    0.018   28.013    0.000    0.503    0.699
##     ChildAbuse               0.095    0.016    5.863    0.000    0.095    0.126
##     ChildNeglctSxl           0.106    0.013    8.092    0.000    0.106    0.152
##     ChildComViolnc           0.000                               0.000    0.000
##   Destruction_Injury ~~                                                        
##     WitnessViolenc           0.608    0.022   27.576    0.000    0.608    0.691
##     ChildAbuse               0.141    0.019    7.504    0.000    0.141    0.153
##     ChildComViolnc           0.091    0.015    5.998    0.000    0.091    0.095
##   WitnessViolence ~~                                                           
##     ChildAbuse               0.132    0.020    6.607    0.000    0.132    0.147
##     ChildNeglctSxl           0.040    0.015    2.656    0.008    0.040    0.048
##     ChildComViolnc           0.135    0.014    9.312    0.000    0.135    0.143
##   ChildAbuse ~~                                                                
##     ChildNeglctSxl           0.000                               0.000    0.000
##     ChildComViolnc           0.367    0.022   16.714    0.000    0.367    0.372
##   ChildNeglectSexual ~~                                                        
##     ChildComViolnc           0.000                               0.000    0.000
##   Destruction_Injury ~~                                                        
##     ChildNeglctSxl           0.000                               0.000    0.000
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##     ConflictTrauma    0.000                               0.000    0.000
##     Isolation_Loss    0.000                               0.000    0.000
##     ViolentVctmztn    0.000                               0.000    0.000
##     Destrctn_Injry    0.000                               0.000    0.000
##     WitnessViolenc    0.000                               0.000    0.000
##     ChildAbuse        0.000                               0.000    0.000
##     ChildNeglctSxl    0.000                               0.000    0.000
##     ChildComViolnc    0.000                               0.000    0.000
##    .htq_ptsd_total    1.909    0.011  170.871    0.000    1.909    3.733
##     q102b_guess_ag   -1.157    0.107  -10.806    0.000   -1.157   -0.224
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .htq_ptsd_total    0.214    0.006   32.985    0.000    0.214    0.819
##     ConflictTrauma    0.949    0.028   33.923    0.000    0.949    1.000
##     Isolation_Loss    0.937    0.027   34.520    0.000    0.937    1.000
##     ViolentVctmztn    0.601    0.017   34.739    0.000    0.601    1.000
##     Destrctn_Injry    0.898    0.026   34.236    0.000    0.898    1.000
##     WitnessViolenc    0.862    0.025   34.496    0.000    0.862    1.000
##     ChildAbuse        0.941    0.028   33.942    0.000    0.941    1.000
##     ChildNeglctSxl    0.807    0.024   33.712    0.000    0.807    1.000
##     ChildComViolnc    1.032    0.031   33.712    0.000    1.032    1.000
##     q102b_guess_ag   26.639    0.782   34.081    0.000   26.639    1.000
## 
## R-Square:
##                    Estimate
##     htq_ptsd_total    0.181
## 
## 
## Group 2 [1]:
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   htq_ptsd_total ~                                                      
##     ConflictTrauma    0.026    0.024    1.104    0.270    0.026    0.053
##     Isolation_Loss   -0.053    0.019   -2.741    0.006   -0.053   -0.100
##     ViolentVctmztn    0.143    0.028    5.170    0.000    0.143    0.371
##     Destrctn_Injry   -0.008    0.031   -0.268    0.789   -0.008   -0.017
##     WitnessViolenc    0.056    0.036    1.580    0.114    0.056    0.115
##     ChildAbuse        0.145    0.024    6.097    0.000    0.145    0.277
##     ChildNeglctSxl    0.012    0.016    0.737    0.461    0.012    0.027
##     ChildComViolnc    0.094    0.023    4.099    0.000    0.094    0.158
##     q102b_guess_ag    0.005    0.003    1.823    0.068    0.005    0.057
## 
## Covariances:
##                           Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   ConflictTrauma ~~                                                            
##     Isolation_Loss           0.349    0.052    6.725    0.000    0.349    0.293
##     ViolentVctmztn           0.558    0.070    7.991    0.000    0.558    0.340
##     Destrctn_Injry           0.912    0.064   14.204    0.000    0.912    0.699
##     WitnessViolenc           0.627    0.059   10.706    0.000    0.627    0.484
##     ChildAbuse               0.281    0.050    5.610    0.000    0.281    0.233
##     ChildNeglctSxl          -0.215    0.050   -4.318    0.000   -0.215   -0.146
##     ChildComViolnc           0.071    0.039    1.802    0.072    0.071    0.067
##   Isolation_Loss ~~                                                            
##     ViolentVctmztn           0.789    0.068   11.649    0.000    0.789    0.515
##     Destrctn_Injry           0.536    0.056    9.651    0.000    0.536    0.440
##     WitnessViolenc           0.602    0.054   11.114    0.000    0.602    0.498
##     ChildAbuse               0.106    0.049    2.157    0.031    0.106    0.094
##     ChildNeglctSxl           0.143    0.059    2.422    0.015    0.143    0.104
##     ChildComViolnc          -0.092    0.035   -2.659    0.008   -0.092   -0.093
##   ViolentVictimization ~~                                                      
##     Destrctn_Injry           1.210    0.083   14.575    0.000    1.210    0.720
##     WitnessViolenc           1.451    0.087   16.642    0.000    1.451    0.871
##     ChildAbuse               0.728    0.064   11.365    0.000    0.728    0.469
##     ChildNeglctSxl           0.334    0.059    5.643    0.000    0.334    0.176
##     ChildComViolnc           0.000                               0.000    0.000
##   Destruction_Injury ~~                                                        
##     WitnessViolenc           1.047    0.068   15.440    0.000    1.047    0.789
##     ChildAbuse               0.487    0.049    9.914    0.000    0.487    0.394
##     ChildComViolnc           0.022    0.030    0.731    0.465    0.022    0.020
##   WitnessViolence ~~                                                           
##     ChildAbuse               0.552    0.051   10.824    0.000    0.552    0.450
##     ChildNeglctSxl           0.185    0.041    4.465    0.000    0.185    0.123
##     ChildComViolnc          -0.016    0.021   -0.756    0.449   -0.016   -0.015
##   ChildAbuse ~~                                                                
##     ChildNeglctSxl           0.000                               0.000    0.000
##     ChildComViolnc           0.492    0.041   12.134    0.000    0.492    0.490
##   ChildNeglectSexual ~~                                                        
##     ChildComViolnc           0.000                               0.000    0.000
##   Destruction_Injury ~~                                                        
##     ChildNeglctSxl           0.000                               0.000    0.000
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##     ConflictTrauma    0.000                               0.000    0.000
##     Isolation_Loss    0.000                               0.000    0.000
##     ViolentVctmztn    0.000                               0.000    0.000
##     Destrctn_Injry    0.000                               0.000    0.000
##     WitnessViolenc    0.000                               0.000    0.000
##     ChildAbuse        0.000                               0.000    0.000
##     ChildNeglctSxl    0.000                               0.000    0.000
##     ChildComViolnc    0.000                               0.000    0.000
##    .htq_ptsd_total    1.816    0.031   59.137    0.000    1.816    3.239
##     q102b_guess_ag    4.187    0.246   17.052    0.000    4.187    0.673
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .htq_ptsd_total    0.166    0.010   17.466    0.000    0.166    0.529
##     ConflictTrauma    1.276    0.076   16.890    0.000    1.276    1.000
##     Isolation_Loss    1.113    0.062   17.892    0.000    1.113    1.000
##     ViolentVctmztn    2.110    0.117   18.096    0.000    2.110    1.000
##     Destrctn_Injry    1.337    0.075   17.841    0.000    1.337    1.000
##     WitnessViolenc    1.316    0.074   17.678    0.000    1.316    1.000
##     ChildAbuse        1.144    0.060   19.208    0.000    1.144    1.000
##     ChildNeglctSxl    1.705    0.097   17.657    0.000    1.705    1.000
##     ChildComViolnc    0.883    0.050   17.676    0.000    0.883    1.000
##     q102b_guess_ag   38.711    2.161   17.916    0.000   38.711    1.000
## 
## R-Square:
##                    Estimate
##     htq_ptsd_total    0.471
f4 <- parameterEstimates(fit_obsg, standardized = TRUE)
#f4 %>% filter(op == "~")
#t2 <- mal %>% filter(op == "~")
#knitr::kable(t2, caption = "Regressions (SAM) in Husbands", digits = 3)
#t2 <- fem %>% filter(op == "~")
#knitr::kable(t2, caption = "Regressions (SAM) in PW", digits = 3)
t3 <- f4 %>% filter(op == "~")
knitr::kable(t3, caption = "Regressions with extracted factors in PW & H", digits = 3)
Regressions with extracted factors in PW & H
lhs op rhs block group est se z pvalue ci.lower ci.upper std.lv std.all std.nox
htq_ptsd_total ~ ConflictTrauma 1 1 -0.008 0.016 -0.484 0.628 -0.039 0.024 -0.008 -0.015 -0.015
htq_ptsd_total ~ Isolation_Loss 1 1 0.063 0.014 4.640 0.000 0.037 0.090 0.063 0.120 0.120
htq_ptsd_total ~ ViolentVictimization 1 1 0.086 0.022 3.921 0.000 0.043 0.128 0.086 0.130 0.130
htq_ptsd_total ~ Destruction_Injury 1 1 0.048 0.021 2.281 0.023 0.007 0.090 0.048 0.090 0.090
htq_ptsd_total ~ WitnessViolence 1 1 0.013 0.017 0.737 0.461 -0.021 0.047 0.013 0.023 0.023
htq_ptsd_total ~ ChildAbuse 1 1 0.101 0.013 7.695 0.000 0.075 0.127 0.101 0.192 0.192
htq_ptsd_total ~ ChildNeglectSexual 1 1 0.083 0.014 6.146 0.000 0.057 0.110 0.083 0.146 0.146
htq_ptsd_total ~ ChildComViolence 1 1 -0.006 0.011 -0.562 0.574 -0.029 0.016 -0.006 -0.013 -0.013
htq_ptsd_total ~ q102b_guess_age 1 1 0.009 0.002 4.440 0.000 0.005 0.012 0.009 0.087 0.017
htq_ptsd_total ~ ConflictTrauma 2 2 0.026 0.024 1.104 0.270 -0.020 0.073 0.026 0.053 0.053
htq_ptsd_total ~ Isolation_Loss 2 2 -0.053 0.019 -2.741 0.006 -0.091 -0.015 -0.053 -0.100 -0.100
htq_ptsd_total ~ ViolentVictimization 2 2 0.143 0.028 5.170 0.000 0.089 0.197 0.143 0.371 0.371
htq_ptsd_total ~ Destruction_Injury 2 2 -0.008 0.031 -0.268 0.789 -0.069 0.052 -0.008 -0.017 -0.017
htq_ptsd_total ~ WitnessViolence 2 2 0.056 0.036 1.580 0.114 -0.014 0.126 0.056 0.115 0.115
htq_ptsd_total ~ ChildAbuse 2 2 0.145 0.024 6.097 0.000 0.098 0.192 0.145 0.277 0.277
htq_ptsd_total ~ ChildNeglectSexual 2 2 0.012 0.016 0.737 0.461 -0.019 0.042 0.012 0.027 0.027
htq_ptsd_total ~ ChildComViolence 2 2 0.094 0.023 4.099 0.000 0.049 0.139 0.094 0.158 0.158
htq_ptsd_total ~ q102b_guess_age 2 2 0.005 0.003 1.823 0.068 0.000 0.011 0.005 0.057 0.009

Interactions (Females)

Tested each possible interaction & set aside significant ones. Reported only those that survive false discovery rate.

datafemale = dataf %>% filter(respondent_cat == 0)

model_obsMod <- "
htq_ptsd_total ~ ConflictTrauma + Isolation_Loss + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + ChildComViolence + q102b_guess_age + Destruction_Injury:ChildNeglectSexual

ConflictTrauma ~~  Isolation_Loss  + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse  + ChildComViolence
Isolation_Loss ~~ ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + ChildComViolence
ViolentVictimization ~~ Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual
ViolentVictimization~~ChildComViolence
Destruction_Injury ~~ WitnessViolence + ChildAbuse + ChildComViolence
WitnessViolence ~~ ChildAbuse + ChildNeglectSexual + ChildComViolence
ConflictTrauma ~~ 0*ChildNeglectSexual
ChildAbuse ~~ ChildNeglectSexual
ChildAbuse ~~ ChildComViolence
ChildNeglectSexual ~~ ChildComViolence
ChildNeglectSexual ~~ Destruction_Injury

ConflictTrauma ~ 0*1
Isolation_Loss ~ 0*1 
ViolentVictimization ~ 0*1 
Destruction_Injury ~ 0*1
WitnessViolence ~ 0*1
ChildAbuse ~0*1 
ChildNeglectSexual ~0*1 
ChildComViolence ~0*1 
"
fit_obs <- sem(model_obsMod, data = datafemale,estimator = "MLR", missing = "FIML.x", meanstructure = T, fixed.x = F)
#summary(fit_obs, fit.measures = T,  standardize=T)
f4 <- parameterEstimates(fit_obs, standardized = TRUE)
f4 %>% filter(op == "~")
##               lhs op                                   rhs    est    se      z
## 1  htq_ptsd_total  ~                        ConflictTrauma -0.008 0.017 -0.470
## 2  htq_ptsd_total  ~                        Isolation_Loss  0.066 0.014  4.781
## 3  htq_ptsd_total  ~                  ViolentVictimization  0.084 0.021  3.936
## 4  htq_ptsd_total  ~                    Destruction_Injury  0.046 0.021  2.205
## 5  htq_ptsd_total  ~                       WitnessViolence  0.012 0.017  0.670
## 6  htq_ptsd_total  ~                            ChildAbuse  0.099 0.013  7.454
## 7  htq_ptsd_total  ~                    ChildNeglectSexual  0.080 0.014  5.665
## 8  htq_ptsd_total  ~                      ChildComViolence -0.005 0.011 -0.446
## 9  htq_ptsd_total  ~                       q102b_guess_age  0.009 0.002  4.485
## 10 htq_ptsd_total  ~ Destruction_Injury:ChildNeglectSexual -0.027 0.012 -2.335
##    pvalue ci.lower ci.upper std.lv std.all std.nox
## 1   0.638   -0.041    0.025 -0.008  -0.015  -0.015
## 2   0.000    0.039    0.093  0.066   0.124   0.124
## 3   0.000    0.042    0.125  0.084   0.126   0.126
## 4   0.027    0.005    0.088  0.046   0.084   0.084
## 5   0.503   -0.022    0.045  0.012   0.021   0.021
## 6   0.000    0.073    0.126  0.099   0.185   0.185
## 7   0.000    0.052    0.107  0.080   0.137   0.137
## 8   0.655   -0.027    0.017 -0.005  -0.010  -0.010
## 9   0.000    0.005    0.012  0.009   0.085   0.017
## 10  0.020   -0.051   -0.004 -0.027  -0.044  -0.053

Models with significant interactions (Females)

Isolation x Sexual Abuse

#Isolation Sexual

model_obsMod1 <- "
htq_ptsd_total ~ ConflictTrauma + Isolation_Loss + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + ChildComViolence + q102b_guess_age + Isolation_Loss:ChildNeglectSexual

ConflictTrauma ~~  Isolation_Loss  + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse  + ChildComViolence
Isolation_Loss ~~ ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + ChildComViolence
ViolentVictimization ~~ Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual
ViolentVictimization~~ChildComViolence
Destruction_Injury ~~ WitnessViolence + ChildAbuse + ChildComViolence
WitnessViolence ~~ ChildAbuse + ChildNeglectSexual + ChildComViolence
ConflictTrauma ~~ 0*ChildNeglectSexual
ChildAbuse ~~ ChildNeglectSexual
ChildAbuse ~~ ChildComViolence
ChildNeglectSexual ~~ ChildComViolence
ChildNeglectSexual ~~ Destruction_Injury

ConflictTrauma ~ 0*1
Isolation_Loss ~ 0*1 
ViolentVictimization ~ 0*1 
Destruction_Injury ~ 0*1
WitnessViolence ~ 0*1
ChildAbuse ~0*1 
ChildNeglectSexual ~0*1 
ChildComViolence ~0*1 

"
fit_obs1 <- sem(model_obsMod1, data = datafemale,estimator = "MLR", missing = "FIML.x", meanstructure = T, fixed.x = F)
datafemale %>% select(Isolation_Loss,ChildNeglectSexual, htq_ptsd_total) %>% report_table()
## Variable           | n_Obs |  Mean |   SD | Median |  MAD |   Min |  Max | Skewness | Kurtosis | percentage_Missing
## -------------------------------------------------------------------------------------------------------------------
## Isolation_Loss     |  2323 | -0.12 | 0.97 |        | 0.52 | -1.34 | 3.01 |     1.52 |     1.51 |               0.60
## ChildNeglectSexual |  2323 | -0.18 | 0.88 |        | 0.77 | -1.62 | 3.39 |     1.07 |     1.35 |               2.20
## htq_ptsd_total     |  2323 |  1.83 | 0.52 |        | 0.54 |  1.00 | 3.79 |     0.46 |    -0.24 |               5.98
result2way2 <- probe2WayMC(fit_obs1, nameX=c("Isolation_Loss","ChildNeglectSexual","Isolation_Loss:ChildNeglectSexual"),
                          nameY="htq_ptsd_total", modVar="ChildNeglectSexual", valProbe = c(-0.7, 0, 0.7))
result2way2
## $SimpleIntcept
##   ChildNeglectSexual   est    se       z pvalue
## 1               -0.7 1.855 0.014 131.562      0
## 2                0.0 1.913 0.011 169.114      0
## 3                0.7 1.970 0.016 123.864      0
## 
## $SimpleSlope
##   ChildNeglectSexual   est    se     z pvalue
## 1               -0.7 0.083 0.016 5.180  0.000
## 2                0.0 0.067 0.014 4.888  0.000
## 3                0.7 0.051 0.016 3.266  0.001
plotProbe(result2way2, xlim = c(-1.34, 3.01), xlab = "Isolation",
  ylab = "PTSD Symptoms", legend = TRUE)

values_probe2 <- seq(from=-1.62, to = 3.39, by = 0.1)
result2way3 <- probe2WayMC(fit_obs1, nameX=c("Isolation_Loss","ChildNeglectSexual","Isolation_Loss:ChildNeglectSexual"),
                          nameY="htq_ptsd_total", modVar="ChildNeglectSexual", valProbe=values_probe2)
result2way3
## $SimpleIntcept
##    ChildNeglectSexual   est    se       z pvalue
## 1               -1.62 1.779 0.024  73.236      0
## 2               -1.52 1.787 0.023  77.551      0
## 3               -1.42 1.795 0.022  82.280      0
## 4               -1.32 1.804 0.021  87.468      0
## 5               -1.22 1.812 0.019  93.158      0
## 6               -1.12 1.820 0.018  99.391      0
## 7               -1.02 1.828 0.017 106.195      0
## 8               -0.92 1.837 0.016 113.574      0
## 9               -0.82 1.845 0.015 121.493      0
## 10              -0.72 1.853 0.014 129.852      0
## 11              -0.62 1.861 0.013 138.455      0
## 12              -0.52 1.870 0.013 146.975      0
## 13              -0.42 1.878 0.012 154.941      0
## 14              -0.32 1.886 0.012 161.752      0
## 15              -0.22 1.894 0.011 166.760      0
## 16              -0.12 1.903 0.011 169.416      0
## 17              -0.02 1.911 0.011 169.429      0
## 18               0.08 1.919 0.012 166.863      0
## 19               0.18 1.927 0.012 162.111      0
## 20               0.28 1.936 0.012 155.760      0
## 21               0.38 1.944 0.013 148.433      0
## 22               0.48 1.952 0.014 140.670      0
## 23               0.58 1.960 0.015 132.879      0
## 24               0.68 1.969 0.016 125.329      0
## 25               0.78 1.977 0.017 118.183      0
## 26               0.88 1.985 0.018 111.518      0
## 27               0.98 1.993 0.019 105.361      0
## 28               1.08 2.002 0.020  99.706      0
## 29               1.18 2.010 0.021  94.527      0
## 30               1.28 2.018 0.022  89.791      0
## 31               1.38 2.026 0.024  85.460      0
## 32               1.48 2.035 0.025  81.496      0
## 33               1.58 2.043 0.026  77.863      0
## 34               1.68 2.051 0.028  74.528      0
## 35               1.78 2.059 0.029  71.460      0
## 36               1.88 2.068 0.030  68.633      0
## 37               1.98 2.076 0.031  66.021      0
## 38               2.08 2.084 0.033  63.604      0
## 39               2.18 2.092 0.034  61.361      0
## 40               2.28 2.101 0.035  59.277      0
## 41               2.38 2.109 0.037  57.335      0
## 42               2.48 2.117 0.038  55.523      0
## 43               2.58 2.126 0.039  53.828      0
## 44               2.68 2.134 0.041  52.241      0
## 45               2.78 2.142 0.042  50.751      0
## 46               2.88 2.150 0.044  49.351      0
## 47               2.98 2.159 0.045  48.032      0
## 48               3.08 2.167 0.046  46.789      0
## 49               3.18 2.175 0.048  45.614      0
## 50               3.28 2.183 0.049  44.504      0
## 51               3.38 2.192 0.050  43.452      0
## 
## $SimpleSlope
##    ChildNeglectSexual    est    se      z pvalue
## 1               -1.62  0.104 0.023  4.491  0.000
## 2               -1.52  0.102 0.022  4.569  0.000
## 3               -1.42  0.099 0.021  4.650  0.000
## 4               -1.32  0.097 0.021  4.732  0.000
## 5               -1.22  0.095 0.020  4.814  0.000
## 6               -1.12  0.093 0.019  4.895  0.000
## 7               -1.02  0.090 0.018  4.974  0.000
## 8               -0.92  0.088 0.017  5.047  0.000
## 9               -0.82  0.086 0.017  5.114  0.000
## 10              -0.72  0.083 0.016  5.170  0.000
## 11              -0.62  0.081 0.016  5.211  0.000
## 12              -0.52  0.079 0.015  5.234  0.000
## 13              -0.42  0.077 0.015  5.233  0.000
## 14              -0.32  0.074 0.014  5.204  0.000
## 15              -0.22  0.072 0.014  5.143  0.000
## 16              -0.12  0.070 0.014  5.049  0.000
## 17              -0.02  0.067 0.014  4.918  0.000
## 18               0.08  0.065 0.014  4.754  0.000
## 19               0.18  0.063 0.014  4.559  0.000
## 20               0.28  0.060 0.014  4.337  0.000
## 21               0.38  0.058 0.014  4.096  0.000
## 22               0.48  0.056 0.015  3.841  0.000
## 23               0.58  0.054 0.015  3.580  0.000
## 24               0.68  0.051 0.015  3.318  0.001
## 25               0.78  0.049 0.016  3.060  0.002
## 26               0.88  0.047 0.017  2.810  0.005
## 27               0.98  0.044 0.017  2.569  0.010
## 28               1.08  0.042 0.018  2.341  0.019
## 29               1.18  0.040 0.019  2.125  0.034
## 30               1.28  0.038 0.020  1.922  0.055
## 31               1.38  0.035 0.020  1.733  0.083
## 32               1.48  0.033 0.021  1.556  0.120
## 33               1.58  0.031 0.022  1.391  0.164
## 34               1.68  0.028 0.023  1.237  0.216
## 35               1.78  0.026 0.024  1.094  0.274
## 36               1.88  0.024 0.025  0.961  0.337
## 37               1.98  0.022 0.026  0.837  0.403
## 38               2.08  0.019 0.027  0.721  0.471
## 39               2.18  0.017 0.028  0.613  0.540
## 40               2.28  0.015 0.029  0.513  0.608
## 41               2.38  0.012 0.030  0.418  0.676
## 42               2.48  0.010 0.031  0.330  0.741
## 43               2.58  0.008 0.032  0.248  0.804
## 44               2.68  0.006 0.033  0.170  0.865
## 45               2.78  0.003 0.034  0.097  0.923
## 46               2.88  0.001 0.035  0.028  0.977
## 47               2.98 -0.001 0.036 -0.036  0.971
## 48               3.08 -0.004 0.037 -0.097  0.923
## 49               3.18 -0.006 0.038 -0.155  0.877
## 50               3.28 -0.008 0.039 -0.209  0.834
## 51               3.38 -0.010 0.040 -0.261  0.794
# PRETTIER GRAPHS
fiti <- lm(htq_ptsd_total ~ ConflictTrauma + Isolation_Loss*ChildNeglectSexual + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildComViolence + q102b_guess_age, data = datafemale)
ss <- sim_slopes(fiti, pred = Isolation_Loss, modx = ChildNeglectSexual, johnson_neyman = TRUE,control.fdr = TRUE)
ss  
## JOHNSON-NEYMAN INTERVAL 
## 
## When ChildNeglectSexual is INSIDE the interval [-28.70, 1.17], the slope of
## Isolation_Loss is p < .05.
## 
## Note: The range of observed values of ChildNeglectSexual is [-1.62, 3.39]
## 
## Interval calculated using false discovery rate adjusted t = 2.20 
## 
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of Isolation_Loss when ChildNeglectSexual = -1.0586168 (- 1 SD): 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.09   0.02     4.63   0.00
## 
## Slope of Isolation_Loss when ChildNeglectSexual = -0.1736839 (Mean): 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.07   0.01     4.92   0.00
## 
## Slope of Isolation_Loss when ChildNeglectSexual =  0.7112489 (+ 1 SD): 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.05   0.02     3.31   0.00
plot(ss)
## Loading required namespace: broom.mixed

probe_interaction(fiti, pred = Isolation_Loss, modx = ChildNeglectSexual, cond.int = TRUE,
                  interval = TRUE,  jnplot = TRUE)
## JOHNSON-NEYMAN INTERVAL 
## 
## When ChildNeglectSexual is OUTSIDE the interval [1.29, 110.82], the slope
## of Isolation_Loss is p < .05.
## 
## Note: The range of observed values of ChildNeglectSexual is [-1.62, 3.39]

## SIMPLE SLOPES ANALYSIS 
## 
## When ChildNeglectSexual = -1.0586168 (- 1 SD): 
## 
##                                 Est.   S.E.   t val.      p
## ----------------------------- ------ ------ -------- ------
## Slope of Isolation_Loss         0.09   0.02     4.63   0.00
## Conditional intercept           1.75   0.02   111.58   0.00
## 
## When ChildNeglectSexual = -0.1736839 (Mean): 
## 
##                                 Est.   S.E.   t val.      p
## ----------------------------- ------ ------ -------- ------
## Slope of Isolation_Loss         0.07   0.01     4.92   0.00
## Conditional intercept           1.83   0.01   178.59   0.00
## 
## When ChildNeglectSexual =  0.7112489 (+ 1 SD): 
## 
##                                 Est.   S.E.   t val.      p
## ----------------------------- ------ ------ -------- ------
## Slope of Isolation_Loss         0.05   0.02     3.31   0.00
## Conditional intercept           1.90   0.02   119.47   0.00

p <- interact_plot(fiti, pred = Isolation_Loss, modx = ChildNeglectSexual, plot.points = TRUE, modx.values = "terciles", colors = "blue", point.size = 1, point.alpha = 0.25, rug = T, jitter = 0.2, x.label = "Isolation & loss", y.label = "PTSD symptoms", interval = T, legend.main = "Neglect &\nSexual abuse", vary.lty = F)
## Medians of each tercile of ChildNeglectSexual are -0.993, -0.319, 0.53
p + theme_2 + scale_y_continuous(limits = c(1.3, 2.3)) + scale_x_continuous(n.breaks = 10) + theme(legend.title = element_text(size = 14), legend.text = element_text(size=12)) 

ggsave("pwixsx.png", width = 6, height = 6, unit = "in", dpi = 300, bg = 'white')
ggsave("pwixsx_leg.png", width = 10, height = 6, unit = "in", dpi = 300, bg = 'white')

Migration violence x Sexual Abuse

model_obsMod2 <- "
htq_ptsd_total ~ ConflictTrauma + Isolation_Loss + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + ChildComViolence + q102b_guess_age + Destruction_Injury:ChildNeglectSexual

ConflictTrauma ~~  Isolation_Loss  + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse  + ChildComViolence
Isolation_Loss ~~ ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + ChildComViolence
ViolentVictimization ~~ Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual
ViolentVictimization~~ChildComViolence
Destruction_Injury ~~ WitnessViolence + ChildAbuse + ChildComViolence
WitnessViolence ~~ ChildAbuse + ChildNeglectSexual + ChildComViolence
ConflictTrauma ~~ 0*ChildNeglectSexual
ChildAbuse ~~ ChildNeglectSexual
ChildAbuse ~~ ChildComViolence
ChildNeglectSexual ~~ ChildComViolence
ChildNeglectSexual ~~ Destruction_Injury

ConflictTrauma ~ 0*1
Isolation_Loss ~ 0*1 
ViolentVictimization ~ 0*1 
Destruction_Injury ~ 0*1
WitnessViolence ~ 0*1
ChildAbuse ~0*1 
ChildNeglectSexual ~0*1 
ChildComViolence ~0*1 

"
fit_obs2 <- sem(model_obsMod2, data = datafemale,estimator = "MLR", missing = "FIML.x", meanstructure = T, fixed.x = F)
datafemale %>% select(Destruction_Injury,ChildNeglectSexual) %>% report_table()
## Variable           | n_Obs |  Mean |   SD | Median |  MAD |   Min |  Max | Skewness | Kurtosis | percentage_Missing
## -------------------------------------------------------------------------------------------------------------------
## Destruction_Injury |  2323 | -0.19 | 0.93 |        | 0.97 | -1.94 | 2.44 |     0.25 |    -0.30 |               0.60
## ChildNeglectSexual |  2323 | -0.18 | 0.88 |        | 0.77 | -1.62 | 3.39 |     1.07 |     1.35 |               2.20
result2way2 <- probe2WayMC(fit_obs2, nameX=c("Destruction_Injury","ChildNeglectSexual","Destruction_Injury:ChildNeglectSexual"),
                          nameY="htq_ptsd_total", modVar="ChildNeglectSexual", valProbe = c(-1, 0, 0.8))
result2way2
## $SimpleIntcept
##   ChildNeglectSexual   est    se       z pvalue
## 1               -1.0 1.832 0.017 107.830      0
## 2                0.0 1.911 0.011 170.628      0
## 3                0.8 1.975 0.017 118.285      0
## 
## $SimpleSlope
##   ChildNeglectSexual   est    se     z pvalue
## 1               -1.0 0.074 0.023 3.169  0.002
## 2                0.0 0.046 0.021 2.205  0.027
## 3                0.8 0.024 0.024 1.028  0.304
plotProbe(result2way2, xlim = c(-1.94, 2.44), xlab = "Migration Violence (SD)",
  ylab = "PTSD Symptoms", legend = TRUE)

values_probe2 <- seq(from=-1.62, to = 3.39, by = 0.1)
result2way3 <- probe2WayMC(fit_obs2, nameX=c("Destruction_Injury","ChildNeglectSexual","Destruction_Injury:ChildNeglectSexual"),
                          nameY="htq_ptsd_total", modVar="ChildNeglectSexual", valProbe=values_probe2)
result2way3
## $SimpleIntcept
##    ChildNeglectSexual   est    se       z pvalue
## 1               -1.62 1.782 0.024  73.530      0
## 2               -1.52 1.790 0.023  77.833      0
## 3               -1.42 1.798 0.022  82.548      0
## 4               -1.32 1.806 0.021  87.721      0
## 5               -1.22 1.814 0.019  93.396      0
## 6               -1.12 1.822 0.018  99.613      0
## 7               -1.02 1.830 0.017 106.402      0
## 8               -0.92 1.838 0.016 113.772      0
## 9               -0.82 1.846 0.015 121.692      0
## 10              -0.72 1.854 0.014 130.070      0
## 11              -0.62 1.862 0.013 138.719      0
## 12              -0.52 1.870 0.013 147.326      0
## 13              -0.42 1.878 0.012 155.430      0
## 14              -0.32 1.886 0.012 162.437      0
## 15              -0.22 1.894 0.011 167.691      0
## 16              -0.12 1.902 0.011 170.620      0
## 17              -0.02 1.909 0.011 170.895      0
## 18               0.08 1.917 0.011 168.545      0
## 19               0.18 1.925 0.012 163.935      0
## 20               0.28 1.933 0.012 157.647      0
## 21               0.38 1.941 0.013 150.313      0
## 22               0.48 1.949 0.014 142.491      0
## 23               0.58 1.957 0.015 134.606      0
## 24               0.68 1.965 0.015 126.946      0
## 25               0.78 1.973 0.016 119.682      0
## 26               0.88 1.981 0.018 112.900      0
## 27               0.98 1.989 0.019 106.631      0
## 28               1.08 1.997 0.020 100.872      0
## 29               1.18 2.005 0.021  95.597      0
## 30               1.28 2.013 0.022  90.774      0
## 31               1.38 2.021 0.023  86.364      0
## 32               1.48 2.029 0.025  82.328      0
## 33               1.58 2.037 0.026  78.631      0
## 34               1.68 2.045 0.027  75.237      0
## 35               1.78 2.053 0.028  72.116      0
## 36               1.88 2.061 0.030  69.241      0
## 37               1.98 2.069 0.031  66.586      0
## 38               2.08 2.076 0.032  64.129      0
## 39               2.18 2.084 0.034  61.850      0
## 40               2.28 2.092 0.035  59.732      0
## 41               2.38 2.100 0.036  57.761      0
## 42               2.48 2.108 0.038  55.921      0
## 43               2.58 2.116 0.039  54.200      0
## 44               2.68 2.124 0.040  52.589      0
## 45               2.78 2.132 0.042  51.078      0
## 46               2.88 2.140 0.043  49.657      0
## 47               2.98 2.148 0.044  48.320      0
## 48               3.08 2.156 0.046  47.059      0
## 49               3.18 2.164 0.047  45.868      0
## 50               3.28 2.172 0.049  44.742      0
## 51               3.38 2.180 0.050  43.675      0
## 
## $SimpleSlope
##    ChildNeglectSexual    est    se      z pvalue
## 1               -1.62  0.091 0.027  3.329  0.001
## 2               -1.52  0.088 0.027  3.319  0.001
## 3               -1.42  0.085 0.026  3.303  0.001
## 4               -1.32  0.083 0.025  3.282  0.001
## 5               -1.22  0.080 0.025  3.255  0.001
## 6               -1.12  0.077 0.024  3.220  0.001
## 7               -1.02  0.074 0.023  3.178  0.001
## 8               -0.92  0.072 0.023  3.128  0.002
## 9               -0.82  0.069 0.022  3.068  0.002
## 10              -0.72  0.066 0.022  2.998  0.003
## 11              -0.62  0.063 0.022  2.918  0.004
## 12              -0.52  0.061 0.021  2.828  0.005
## 13              -0.42  0.058 0.021  2.728  0.006
## 14              -0.32  0.055 0.021  2.617  0.009
## 15              -0.22  0.052 0.021  2.497  0.013
## 16              -0.12  0.050 0.021  2.369  0.018
## 17              -0.02  0.047 0.021  2.233  0.026
## 18               0.08  0.044 0.021  2.091  0.037
## 19               0.18  0.041 0.021  1.945  0.052
## 20               0.28  0.039 0.022  1.796  0.073
## 21               0.38  0.036 0.022  1.645  0.100
## 22               0.48  0.033 0.022  1.495  0.135
## 23               0.58  0.030 0.023  1.346  0.178
## 24               0.68  0.028 0.023  1.199  0.230
## 25               0.78  0.025 0.024  1.056  0.291
## 26               0.88  0.022 0.024  0.918  0.359
## 27               0.98  0.019 0.025  0.784  0.433
## 28               1.08  0.017 0.025  0.656  0.512
## 29               1.18  0.014 0.026  0.533  0.594
## 30               1.28  0.011 0.027  0.416  0.677
## 31               1.38  0.008 0.028  0.305  0.760
## 32               1.48  0.006 0.028  0.199  0.842
## 33               1.58  0.003 0.029  0.099  0.921
## 34               1.68  0.000 0.030  0.005  0.996
## 35               1.78 -0.003 0.031 -0.085  0.933
## 36               1.88 -0.005 0.032 -0.169  0.866
## 37               1.98 -0.008 0.033 -0.249  0.803
## 38               2.08 -0.011 0.033 -0.324  0.746
## 39               2.18 -0.014 0.034 -0.396  0.692
## 40               2.28 -0.016 0.035 -0.463  0.643
## 41               2.38 -0.019 0.036 -0.527  0.599
## 42               2.48 -0.022 0.037 -0.587  0.557
## 43               2.58 -0.025 0.038 -0.644  0.520
## 44               2.68 -0.027 0.039 -0.697  0.486
## 45               2.78 -0.030 0.040 -0.748  0.454
## 46               2.88 -0.033 0.041 -0.797  0.426
## 47               2.98 -0.036 0.042 -0.843  0.399
## 48               3.08 -0.038 0.043 -0.886  0.375
## 49               3.18 -0.041 0.044 -0.928  0.354
## 50               3.28 -0.044 0.045 -0.967  0.334
## 51               3.38 -0.047 0.046 -1.004  0.315
# 1       -1.18  0.113 0.054  2.087  0.037
# 2       -1.13  0.111 0.054  2.061  0.039
# 3       -1.08  0.108 0.053  2.034  0.042
# 4       -1.03  0.106 0.053  2.006  0.045
# 5       -0.98  0.103 0.052  1.977  0.048

fiti <- lm(htq_ptsd_total ~ ConflictTrauma + Isolation_Loss + ViolentVictimization + Destruction_Injury*ChildNeglectSexual + WitnessViolence + ChildAbuse + ChildComViolence + q102b_guess_age, data = datafemale)
ss <- sim_slopes(fiti, pred = Destruction_Injury, modx = ChildNeglectSexual, johnson_neyman = TRUE,control.fdr = TRUE)
ss  
## JOHNSON-NEYMAN INTERVAL 
## 
## When ChildNeglectSexual is INSIDE the interval [-20.25, -0.23], the slope
## of Destruction_Injury is p < .05.
## 
## Note: The range of observed values of ChildNeglectSexual is [-1.62, 3.39]
## 
## Interval calculated using false discovery rate adjusted t = 2.46 
## 
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of Destruction_Injury when ChildNeglectSexual = -1.0586168 (- 1 SD): 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.08   0.02     3.09   0.00
## 
## Slope of Destruction_Injury when ChildNeglectSexual = -0.1736839 (Mean): 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.05   0.02     2.39   0.02
## 
## Slope of Destruction_Injury when ChildNeglectSexual =  0.7112489 (+ 1 SD): 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.03   0.02     1.15   0.25
plot(ss)

probe_interaction(fiti, pred = Destruction_Injury, modx = ChildNeglectSexual, cond.int = TRUE,  interval = TRUE,  jnplot = TRUE)
## JOHNSON-NEYMAN INTERVAL 
## 
## When ChildNeglectSexual is OUTSIDE the interval [0.15, 13.66], the slope of
## Destruction_Injury is p < .05.
## 
## Note: The range of observed values of ChildNeglectSexual is [-1.62, 3.39]

## SIMPLE SLOPES ANALYSIS 
## 
## When ChildNeglectSexual = -1.0586168 (- 1 SD): 
## 
##                                     Est.   S.E.   t val.      p
## --------------------------------- ------ ------ -------- ------
## Slope of Destruction_Injury         0.08   0.02     3.09   0.00
## Conditional intercept               1.75   0.02   111.70   0.00
## 
## When ChildNeglectSexual = -0.1736839 (Mean): 
## 
##                                     Est.   S.E.   t val.      p
## --------------------------------- ------ ------ -------- ------
## Slope of Destruction_Injury         0.05   0.02     2.39   0.02
## Conditional intercept               1.83   0.01   180.34   0.00
## 
## When ChildNeglectSexual =  0.7112489 (+ 1 SD): 
## 
##                                     Est.   S.E.   t val.      p
## --------------------------------- ------ ------ -------- ------
## Slope of Destruction_Injury         0.03   0.02     1.15   0.25
## Conditional intercept               1.90   0.02   120.45   0.00

#interact_plot(fiti, pred = Destruction_Injury, modx = ChildNeglectSexual, plot.points = TRUE)
d <- interact_plot(fiti, pred = Destruction_Injury, modx = ChildNeglectSexual, plot.points = TRUE, modx.values = "terciles", colors = "blue", point.size = 1, point.alpha = 0.25, rug = T, jitter = 0.2, x.label = "Destruction & Injury", y.label = "PTSD symptoms", interval = T, legend.main = "Neglect &\nSexual abuse", vary.lty = F)
## Medians of each tercile of ChildNeglectSexual are -0.993, -0.319, 0.53
d+ theme_2 + scale_y_continuous(limits = c(1.3, 2.3)) + scale_x_continuous(n.breaks = 10)

ggsave("pwmvxsx.png", width = 6, height = 6, unit = "in", dpi = 300, bg = 'white')
ggsave("pwmvxsx_leg.png", width = 10, height = 6, unit = "in", dpi = 300, bg = 'white')

Interactions (Males)

Tested each possible interaction & set aside significant ones. Reported only those that survive false discovery rate.

datamale = dataf %>% filter(respondent_cat == 1)

model_obsMod <- "
htq_ptsd_total ~ ConflictTrauma + Isolation_Loss + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + ChildComViolence + q102b_guess_age + WitnessViolence:ChildComViolence

ConflictTrauma ~~  Isolation_Loss  + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse  + ChildComViolence
Isolation_Loss ~~ ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + 0*ChildComViolence
ViolentVictimization ~~ Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual
ViolentVictimization~~ChildComViolence
Destruction_Injury ~~ WitnessViolence + ChildAbuse + ChildComViolence
WitnessViolence ~~ ChildAbuse + ChildNeglectSexual + ChildComViolence
ConflictTrauma ~~ ChildNeglectSexual
ChildAbuse ~~ ChildNeglectSexual
ChildAbuse ~~ ChildComViolence
ChildNeglectSexual ~~ 0*ChildComViolence
ChildNeglectSexual ~~ Destruction_Injury

ConflictTrauma ~ 0*1
Isolation_Loss ~ 0*1 
ViolentVictimization ~ 0*1 
Destruction_Injury ~ 0*1
WitnessViolence ~ 0*1
ChildAbuse ~0*1 
ChildNeglectSexual ~0*1 
ChildComViolence ~0*1 
"
fit_obs <- sem(model_obsMod, data = datamale,estimator = "MLR", missing = "FIML.x", meanstructure = T, fixed.x = F)
summary(fit_obs, fit.measures = T,  standardize=T)
## lavaan 0.6.17 ended normally after 66 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        51
## 
##   Number of observations                           642
##   Number of missing patterns                         6
## 
## Model Test User Model:
##                                               Standard      Scaled
##   Test Statistic                              1504.871    1277.755
##   Degrees of freedom                                26          26
##   P-value (Chi-square)                           0.000       0.000
##   Scaling correction factor                                  1.178
##     Yuan-Bentler correction (Mplus variant)                       
## 
## Model Test Baseline Model:
## 
##   Test statistic                              3069.497    2774.792
##   Degrees of freedom                                54          54
##   P-value                                        0.000       0.000
##   Scaling correction factor                                  1.106
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.510       0.540
##   Tucker-Lewis Index (TLI)                      -0.019       0.044
##                                                                   
##   Robust Comparative Fit Index (CFI)                         0.512
##   Robust Tucker-Lewis Index (TLI)                           -0.013
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)              -9765.398   -9765.398
##   Scaling correction factor                                  1.034
##       for the MLR correction                                      
##   Loglikelihood unrestricted model (H1)      -9012.963   -9012.963
##   Scaling correction factor                                  1.083
##       for the MLR correction                                      
##                                                                   
##   Akaike (AIC)                               19632.797   19632.797
##   Bayesian (BIC)                             19860.491   19860.491
##   Sample-size adjusted Bayesian (SABIC)      19698.569   19698.569
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.298       0.274
##   90 Percent confidence interval - lower         0.285       0.262
##   90 Percent confidence interval - upper         0.311       0.286
##   P-value H_0: RMSEA <= 0.050                    0.000       0.000
##   P-value H_0: RMSEA >= 0.080                    1.000       1.000
##                                                                   
##   Robust RMSEA                                               0.300
##   90 Percent confidence interval - lower                     0.285
##   90 Percent confidence interval - upper                     0.315
##   P-value H_0: Robust RMSEA <= 0.050                         0.000
##   P-value H_0: Robust RMSEA >= 0.080                         1.000
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.470       0.470
## 
## Parameter Estimates:
## 
##   Standard errors                             Sandwich
##   Information bread                           Observed
##   Observed information based on                Hessian
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   htq_ptsd_total ~                                                      
##     ConflictTrauma    0.023    0.024    0.959    0.338    0.023    0.045
##     Isolation_Loss   -0.053    0.020   -2.582    0.010   -0.053   -0.098
##     ViolentVctmztn    0.146    0.027    5.383    0.000    0.146    0.389
##     Destrctn_Injry   -0.006    0.029   -0.219    0.826   -0.006   -0.013
##     WitnessViolenc    0.067    0.035    1.902    0.057    0.067    0.139
##     ChildAbuse        0.137    0.024    5.713    0.000    0.137    0.260
##     ChildNeglctSxl    0.010    0.016    0.639    0.523    0.010    0.023
##     ChildComViolnc    0.042    0.036    1.188    0.235    0.042    0.069
##     q102b_guess_ag    0.005    0.003    2.014    0.044    0.005    0.055
##     WtnssVlnc:ChCV    0.057    0.025    2.288    0.022    0.057    0.113
## 
## Covariances:
##                           Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   ConflictTrauma ~~                                                            
##     Isolation_Loss           0.357    0.042    8.590    0.000    0.357    0.305
##     ViolentVctmztn           0.548    0.060    9.129    0.000    0.548    0.324
##     Destrctn_Injry           0.856    0.049   17.571    0.000    0.856    0.673
##     WitnessViolenc           0.603    0.048   12.551    0.000    0.603    0.459
##     ChildAbuse               0.231    0.044    5.293    0.000    0.231    0.194
##     ChildComViolnc           0.117    0.039    2.984    0.003    0.117    0.113
##   Isolation_Loss ~~                                                            
##     ViolentVctmztn           0.872    0.067   12.921    0.000    0.872    0.533
##     Destrctn_Injry           0.577    0.046   12.620    0.000    0.577    0.468
##     WitnessViolenc           0.659    0.051   12.975    0.000    0.659    0.518
##     ChildAbuse               0.205    0.036    5.689    0.000    0.205    0.177
##     ChildNeglctSxl           0.330    0.053    6.188    0.000    0.330    0.238
##     ChildComViolnc           0.000                               0.000    0.000
##   ViolentVictimization ~~                                                      
##     Destrctn_Injry           1.314    0.068   19.246    0.000    1.314    0.738
##     WitnessViolenc           1.620    0.069   23.553    0.000    1.620    0.883
##     ChildAbuse               0.925    0.064   14.431    0.000    0.925    0.554
##     ChildNeglctSxl           0.985    0.082   12.087    0.000    0.985    0.491
##     ChildComViolnc           0.143    0.045    3.182    0.001    0.143    0.099
##   Destruction_Injury ~~                                                        
##     WitnessViolenc           1.104    0.056   19.756    0.000    1.104    0.799
##     ChildAbuse               0.533    0.046   11.697    0.000    0.533    0.424
##     ChildComViolnc           0.106    0.035    3.006    0.003    0.106    0.098
##   WitnessViolence ~~                                                           
##     ChildAbuse               0.671    0.047   14.192    0.000    0.671    0.518
##     ChildNeglctSxl           0.704    0.060   11.715    0.000    0.704    0.452
##     ChildComViolnc           0.083    0.034    2.417    0.016    0.083    0.074
##   ConflictTrauma ~~                                                            
##     ChildNeglctSxl           0.087    0.059    1.481    0.139    0.087    0.061
##   ChildAbuse ~~                                                                
##     ChildNeglctSxl           0.620    0.051   12.218    0.000    0.620    0.438
##     ChildComViolnc           0.525    0.038   13.838    0.000    0.525    0.515
##   ChildNeglectSexual ~~                                                        
##     ChildComViolnc           0.000                               0.000    0.000
##   Destruction_Injury ~~                                                        
##     ChildNeglctSxl           0.517    0.059    8.760    0.000    0.517    0.342
##   q102b_guess_age ~~                                                           
##     WtnssVlnc:ChCV          -0.221    0.301   -0.736    0.462   -0.221   -0.031
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##     ConflictTrauma    0.000                               0.000    0.000
##     Isolation_Loss    0.000                               0.000    0.000
##     ViolentVctmztn    0.000                               0.000    0.000
##     Destrctn_Injry    0.000                               0.000    0.000
##     WitnessViolenc    0.000                               0.000    0.000
##     ChildAbuse        0.000                               0.000    0.000
##     ChildNeglctSxl    0.000                               0.000    0.000
##     ChildComViolnc    0.000                               0.000    0.000
##    .htq_ptsd_total    1.800    0.031   57.819    0.000    1.800    3.133
##     q102b_guess_ag    4.187    0.246   17.052    0.000    4.187    0.673
##     WtnssVlnc:ChCV    0.080    0.046    1.750    0.080    0.080    0.070
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .htq_ptsd_total    0.165    0.009   18.270    0.000    0.165    0.500
##     ConflictTrauma    1.208    0.054   22.246    0.000    1.208    1.000
##     Isolation_Loss    1.133    0.080   14.235    0.000    1.133    1.000
##     ViolentVctmztn    2.363    0.096   24.639    0.000    2.363    1.000
##     Destrctn_Injry    1.341    0.062   21.659    0.000    1.341    1.000
##     WitnessViolenc    1.425    0.052   27.213    0.000    1.425    1.000
##     ChildAbuse        1.179    0.061   19.188    0.000    1.179    1.000
##     ChildNeglctSxl    1.704    0.114   14.938    0.000    1.704    1.000
##     ChildComViolnc    0.884    0.037   23.797    0.000    0.884    1.000
##     q102b_guess_ag   38.711    3.341   11.588    0.000   38.711    1.000
##     WtnssVlnc:ChCV    1.300    0.080   16.343    0.000    1.300    1.000
f4 <- parameterEstimates(fit_obs, standardized = TRUE)
f4 %>% filter(op == "~")
##               lhs op                              rhs    est    se      z
## 1  htq_ptsd_total  ~                   ConflictTrauma  0.023 0.024  0.959
## 2  htq_ptsd_total  ~                   Isolation_Loss -0.053 0.020 -2.582
## 3  htq_ptsd_total  ~             ViolentVictimization  0.146 0.027  5.383
## 4  htq_ptsd_total  ~               Destruction_Injury -0.006 0.029 -0.219
## 5  htq_ptsd_total  ~                  WitnessViolence  0.067 0.035  1.902
## 6  htq_ptsd_total  ~                       ChildAbuse  0.137 0.024  5.713
## 7  htq_ptsd_total  ~               ChildNeglectSexual  0.010 0.016  0.639
## 8  htq_ptsd_total  ~                 ChildComViolence  0.042 0.036  1.188
## 9  htq_ptsd_total  ~                  q102b_guess_age  0.005 0.003  2.014
## 10 htq_ptsd_total  ~ WitnessViolence:ChildComViolence  0.057 0.025  2.288
##    pvalue ci.lower ci.upper std.lv std.all std.nox
## 1   0.338   -0.024    0.071  0.023   0.045   0.045
## 2   0.010   -0.093   -0.013 -0.053  -0.098  -0.098
## 3   0.000    0.093    0.199  0.146   0.389   0.389
## 4   0.826   -0.063    0.051 -0.006  -0.013  -0.013
## 5   0.057   -0.002    0.136  0.067   0.139   0.139
## 6   0.000    0.090    0.184  0.137   0.260   0.260
## 7   0.523   -0.021    0.041  0.010   0.023   0.023
## 8   0.235   -0.027    0.112  0.042   0.069   0.069
## 9   0.044    0.000    0.010  0.005   0.055   0.009
## 10  0.022    0.008    0.106  0.057   0.113   0.099

Models with significant interactions (Males)

Isolation x Community violence

model_obsMod1 <- "
htq_ptsd_total ~ ConflictTrauma + Isolation_Loss + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + ChildComViolence + q102b_guess_age + Isolation_Loss:ChildComViolence

ConflictTrauma ~~  Isolation_Loss  + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse  + ChildComViolence
Isolation_Loss ~~ ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + 0*ChildComViolence
ViolentVictimization ~~ Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual
ViolentVictimization~~ChildComViolence
Destruction_Injury ~~ WitnessViolence + ChildAbuse + ChildComViolence
WitnessViolence ~~ ChildAbuse + ChildNeglectSexual + ChildComViolence
ConflictTrauma ~~ ChildNeglectSexual
ChildAbuse ~~ ChildNeglectSexual
ChildAbuse ~~ ChildComViolence
ChildNeglectSexual ~~ 0*ChildComViolence
ChildNeglectSexual ~~ Destruction_Injury

ConflictTrauma ~ 0*1
Isolation_Loss ~ 0*1 
ViolentVictimization ~ 0*1 
Destruction_Injury ~ 0*1
WitnessViolence ~ 0*1
ChildAbuse ~0*1 
ChildNeglectSexual ~0*1 
ChildComViolence ~0*1 

"
fit_obs1 <- sem(model_obsMod1, data = datamale,estimator = "MLR", missing = "FIML.x", meanstructure = T, fixed.x = F)
datamale %>% select(Isolation_Loss,ChildComViolence, htq_ptsd_total) %>% report_table()
## Variable         | n_Obs |  Mean |   SD | Median |  MAD |   Min |  Max | Skewness | Kurtosis | percentage_Missing
## -----------------------------------------------------------------------------------------------------------------
## Isolation_Loss   |   642 |  0.45 | 0.97 |        | 0.28 | -1.34 | 2.79 |     1.02 |    -0.09 |               0.78
## ChildComViolence |   642 | -0.07 | 0.94 |        | 1.31 | -2.87 | 1.39 |    -0.06 |    -0.92 |               2.80
## htq_ptsd_total   |   642 |  2.10 | 0.52 |        | 0.58 |  1.00 | 3.45 |     0.15 |    -0.89 |               3.43
result2way2 <- probe2WayMC(fit_obs1, nameX=c("Isolation_Loss","ChildComViolence","Isolation_Loss:ChildComViolence"),
                          nameY="htq_ptsd_total", modVar="ChildComViolence", valProbe = c(-0.5, 0, 1.4))
result2way2
## $SimpleIntcept
##   ChildComViolence   est    se      z pvalue
## 1             -0.5 1.773 0.029 60.455      0
## 2              0.0 1.809 0.029 61.548      0
## 3              1.4 1.909 0.053 36.037      0
## 
## $SimpleSlope
##   ChildComViolence    est    se      z pvalue
## 1             -0.5 -0.068 0.021 -3.245  0.001
## 2              0.0 -0.044 0.021 -2.127  0.033
## 3              1.4  0.022 0.038  0.584  0.559
plotProbe(result2way2, xlim = c(-1.34, 2.79), xlab = "Isolation",
  ylab = "PTSD Symptoms", legend = TRUE)

values_probe2 <- seq(from=-2.87, to = 1.39, by = 0.05)
result2way3 <- probe2WayMC(fit_obs1, nameX=c("Isolation_Loss","ChildComViolence","Isolation_Loss:ChildComViolence"),
                          nameY="htq_ptsd_total", modVar="ChildComViolence", valProbe=values_probe2)
result2way3
## $SimpleIntcept
##    ChildComViolence   est    se      z pvalue
## 1             -2.87 1.603 0.076 21.074      0
## 2             -2.82 1.606 0.075 21.473      0
## 3             -2.77 1.610 0.074 21.885      0
## 4             -2.72 1.613 0.072 22.310      0
## 5             -2.67 1.617 0.071 22.748      0
## 6             -2.62 1.621 0.070 23.200      0
## 7             -2.57 1.624 0.069 23.668      0
## 8             -2.52 1.628 0.067 24.150      0
## 9             -2.47 1.631 0.066 24.649      0
## 10            -2.42 1.635 0.065 25.164      0
## 11            -2.37 1.639 0.064 25.697      0
## 12            -2.32 1.642 0.063 26.248      0
## 13            -2.27 1.646 0.061 26.818      0
## 14            -2.22 1.649 0.060 27.408      0
## 15            -2.17 1.653 0.059 28.018      0
## 16            -2.12 1.657 0.058 28.650      0
## 17            -2.07 1.660 0.057 29.303      0
## 18            -2.02 1.664 0.055 29.980      0
## 19            -1.97 1.667 0.054 30.681      0
## 20            -1.92 1.671 0.053 31.407      0
## 21            -1.87 1.674 0.052 32.159      0
## 22            -1.82 1.678 0.051 32.937      0
## 23            -1.77 1.682 0.050 33.742      0
## 24            -1.72 1.685 0.049 34.576      0
## 25            -1.67 1.689 0.048 35.439      0
## 26            -1.62 1.692 0.047 36.331      0
## 27            -1.57 1.696 0.046 37.254      0
## 28            -1.52 1.700 0.044 38.206      0
## 29            -1.47 1.703 0.043 39.189      0
## 30            -1.42 1.707 0.042 40.203      0
## 31            -1.37 1.710 0.041 41.246      0
## 32            -1.32 1.714 0.040 42.318      0
## 33            -1.27 1.717 0.040 43.419      0
## 34            -1.22 1.721 0.039 44.545      0
## 35            -1.17 1.725 0.038 45.695      0
## 36            -1.12 1.728 0.037 46.866      0
## 37            -1.07 1.732 0.036 48.054      0
## 38            -1.02 1.735 0.035 49.255      0
## 39            -0.97 1.739 0.034 50.461      0
## 40            -0.92 1.743 0.034 51.667      0
## 41            -0.87 1.746 0.033 52.865      0
## 42            -0.82 1.750 0.032 54.046      0
## 43            -0.77 1.753 0.032 55.200      0
## 44            -0.72 1.757 0.031 56.315      0
## 45            -0.67 1.760 0.031 57.380      0
## 46            -0.62 1.764 0.030 58.383      0
## 47            -0.57 1.768 0.030 59.309      0
## 48            -0.52 1.771 0.029 60.147      0
## 49            -0.47 1.775 0.029 60.884      0
## 50            -0.42 1.778 0.029 61.509      0
## 51            -0.37 1.782 0.029 62.011      0
## 52            -0.32 1.786 0.029 62.384      0
## 53            -0.27 1.789 0.029 62.620      0
## 54            -0.22 1.793 0.029 62.718      0
## 55            -0.17 1.796 0.029 62.676      0
## 56            -0.12 1.800 0.029 62.498      0
## 57            -0.07 1.804 0.029 62.189      0
## 58            -0.02 1.807 0.029 61.755      0
## 59             0.03 1.811 0.030 61.206      0
## 60             0.08 1.814 0.030 60.553      0
## 61             0.13 1.818 0.030 59.808      0
## 62             0.18 1.821 0.031 58.983      0
## 63             0.23 1.825 0.031 58.090      0
## 64             0.28 1.829 0.032 57.141      0
## 65             0.33 1.832 0.033 56.149      0
## 66             0.38 1.836 0.033 55.123      0
## 67             0.43 1.839 0.034 54.075      0
## 68             0.48 1.843 0.035 53.011      0
## 69             0.53 1.847 0.036 51.941      0
## 70             0.58 1.850 0.036 50.871      0
## 71             0.63 1.854 0.037 49.807      0
## 72             0.68 1.857 0.038 48.754      0
## 73             0.73 1.861 0.039 47.715      0
## 74             0.78 1.864 0.040 46.694      0
## 75             0.83 1.868 0.041 45.693      0
## 76             0.88 1.872 0.042 44.715      0
## 77             0.93 1.875 0.043 43.761      0
## 78             0.98 1.879 0.044 42.831      0
## 79             1.03 1.882 0.045 41.927      0
## 80             1.08 1.886 0.046 41.049      0
## 81             1.13 1.890 0.047 40.197      0
## 82             1.18 1.893 0.048 39.371      0
## 83             1.23 1.897 0.049 38.571      0
## 84             1.28 1.900 0.050 37.796      0
## 85             1.33 1.904 0.051 37.046      0
## 86             1.38 1.907 0.053 36.320      0
## 
## $SimpleSlope
##    ChildComViolence    est    se      z pvalue
## 1             -2.87 -0.180 0.057 -3.172  0.002
## 2             -2.82 -0.177 0.056 -3.183  0.001
## 3             -2.77 -0.175 0.055 -3.194  0.001
## 4             -2.72 -0.173 0.054 -3.206  0.001
## 5             -2.67 -0.170 0.053 -3.217  0.001
## 6             -2.62 -0.168 0.052 -3.229  0.001
## 7             -2.57 -0.166 0.051 -3.241  0.001
## 8             -2.52 -0.163 0.050 -3.254  0.001
## 9             -2.47 -0.161 0.049 -3.266  0.001
## 10            -2.42 -0.158 0.048 -3.279  0.001
## 11            -2.37 -0.156 0.047 -3.292  0.001
## 12            -2.32 -0.154 0.047 -3.305  0.001
## 13            -2.27 -0.151 0.046 -3.319  0.001
## 14            -2.22 -0.149 0.045 -3.333  0.001
## 15            -2.17 -0.147 0.044 -3.346  0.001
## 16            -2.12 -0.144 0.043 -3.361  0.001
## 17            -2.07 -0.142 0.042 -3.375  0.001
## 18            -2.02 -0.139 0.041 -3.390  0.001
## 19            -1.97 -0.137 0.040 -3.404  0.001
## 20            -1.92 -0.135 0.039 -3.419  0.001
## 21            -1.87 -0.132 0.039 -3.434  0.001
## 22            -1.82 -0.130 0.038 -3.449  0.001
## 23            -1.77 -0.128 0.037 -3.464  0.001
## 24            -1.72 -0.125 0.036 -3.478  0.001
## 25            -1.67 -0.123 0.035 -3.493  0.000
## 26            -1.62 -0.121 0.034 -3.507  0.000
## 27            -1.57 -0.118 0.034 -3.521  0.000
## 28            -1.52 -0.116 0.033 -3.535  0.000
## 29            -1.47 -0.113 0.032 -3.548  0.000
## 30            -1.42 -0.111 0.031 -3.560  0.000
## 31            -1.37 -0.109 0.030 -3.571  0.000
## 32            -1.32 -0.106 0.030 -3.581  0.000
## 33            -1.27 -0.104 0.029 -3.590  0.000
## 34            -1.22 -0.102 0.028 -3.597  0.000
## 35            -1.17 -0.099 0.028 -3.602  0.000
## 36            -1.12 -0.097 0.027 -3.604  0.000
## 37            -1.07 -0.095 0.026 -3.604  0.000
## 38            -1.02 -0.092 0.026 -3.601  0.000
## 39            -0.97 -0.090 0.025 -3.594  0.000
## 40            -0.92 -0.087 0.024 -3.583  0.000
## 41            -0.87 -0.085 0.024 -3.567  0.000
## 42            -0.82 -0.083 0.023 -3.545  0.000
## 43            -0.77 -0.080 0.023 -3.518  0.000
## 44            -0.72 -0.078 0.022 -3.485  0.000
## 45            -0.67 -0.076 0.022 -3.444  0.001
## 46            -0.62 -0.073 0.022 -3.395  0.001
## 47            -0.57 -0.071 0.021 -3.339  0.001
## 48            -0.52 -0.068 0.021 -3.273  0.001
## 49            -0.47 -0.066 0.021 -3.200  0.001
## 50            -0.42 -0.064 0.020 -3.117  0.002
## 51            -0.37 -0.061 0.020 -3.025  0.002
## 52            -0.32 -0.059 0.020 -2.925  0.003
## 53            -0.27 -0.057 0.020 -2.817  0.005
## 54            -0.22 -0.054 0.020 -2.701  0.007
## 55            -0.17 -0.052 0.020 -2.579  0.010
## 56            -0.12 -0.050 0.020 -2.451  0.014
## 57            -0.07 -0.047 0.020 -2.318  0.020
## 58            -0.02 -0.045 0.021 -2.182  0.029
## 59             0.03 -0.042 0.021 -2.044  0.041
## 60             0.08 -0.040 0.021 -1.905  0.057
## 61             0.13 -0.038 0.021 -1.766  0.077
## 62             0.18 -0.035 0.022 -1.627  0.104
## 63             0.23 -0.033 0.022 -1.491  0.136
## 64             0.28 -0.031 0.023 -1.357  0.175
## 65             0.33 -0.028 0.023 -1.227  0.220
## 66             0.38 -0.026 0.024 -1.100  0.272
## 67             0.43 -0.024 0.024 -0.977  0.329
## 68             0.48 -0.021 0.025 -0.858  0.391
## 69             0.53 -0.019 0.025 -0.744  0.457
## 70             0.58 -0.016 0.026 -0.635  0.526
## 71             0.63 -0.014 0.026 -0.530  0.596
## 72             0.68 -0.012 0.027 -0.430  0.667
## 73             0.73 -0.009 0.028 -0.334  0.738
## 74             0.78 -0.007 0.029 -0.243  0.808
## 75             0.83 -0.005 0.029 -0.156  0.876
## 76             0.88 -0.002 0.030 -0.074  0.941
## 77             0.93  0.000 0.031  0.005  0.996
## 78             0.98  0.003 0.032  0.080  0.936
## 79             1.03  0.005 0.032  0.152  0.880
## 80             1.08  0.007 0.033  0.219  0.826
## 81             1.13  0.010 0.034  0.284  0.776
## 82             1.18  0.012 0.035  0.346  0.730
## 83             1.23  0.014 0.036  0.404  0.686
## 84             1.28  0.017 0.036  0.460  0.645
## 85             1.33  0.019 0.037  0.513  0.608
## 86             1.38  0.021 0.038  0.564  0.573
# PRETTIER GRAPHS
fiti <- lm(htq_ptsd_total ~ ConflictTrauma + Isolation_Loss*ChildComViolence + ChildNeglectSexual + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + q102b_guess_age, data = datamale)
ss <- sim_slopes(fiti, pred = Isolation_Loss, modx = ChildComViolence, johnson_neyman = TRUE,control.fdr = TRUE)
ss  
## JOHNSON-NEYMAN INTERVAL 
## 
## When ChildComViolence is OUTSIDE the interval [0.14, 25.58], the slope of
## Isolation_Loss is p < .05.
## 
## Note: The range of observed values of ChildComViolence is [-2.87, 1.39]
## 
## Interval calculated using false discovery rate adjusted t = 2.11 
## 
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of Isolation_Loss when ChildComViolence = -0.99103911 (- 1 SD): 
## 
##    Est.   S.E.   t val.      p
## ------- ------ -------- ------
##   -0.09   0.03    -3.77   0.00
## 
## Slope of Isolation_Loss when ChildComViolence = -0.05797478 (Mean): 
## 
##    Est.   S.E.   t val.      p
## ------- ------ -------- ------
##   -0.05   0.02    -2.67   0.01
## 
## Slope of Isolation_Loss when ChildComViolence =  0.87508955 (+ 1 SD): 
## 
##    Est.   S.E.   t val.      p
## ------- ------ -------- ------
##   -0.01   0.03    -0.40   0.69
plot(ss)

probe_interaction(fiti, pred = Isolation_Loss, modx = ChildComViolence, cond.int = TRUE,
                  interval = TRUE,  jnplot = TRUE)
## JOHNSON-NEYMAN INTERVAL 
## 
## When ChildComViolence is OUTSIDE the interval [0.20, 11.53], the slope of
## Isolation_Loss is p < .05.
## 
## Note: The range of observed values of ChildComViolence is [-2.87, 1.39]

## SIMPLE SLOPES ANALYSIS 
## 
## When ChildComViolence = -0.99103911 (- 1 SD): 
## 
##                                  Est.   S.E.   t val.      p
## ----------------------------- ------- ------ -------- ------
## Slope of Isolation_Loss         -0.09   0.03    -3.77   0.00
## Conditional intercept            2.02   0.03    74.00   0.00
## 
## When ChildComViolence = -0.05797478 (Mean): 
## 
##                                  Est.   S.E.   t val.      p
## ----------------------------- ------- ------ -------- ------
## Slope of Isolation_Loss         -0.05   0.02    -2.67   0.01
## Conditional intercept            2.10   0.02   126.15   0.00
## 
## When ChildComViolence =  0.87508955 (+ 1 SD): 
## 
##                                  Est.   S.E.   t val.      p
## ----------------------------- ------- ------ -------- ------
## Slope of Isolation_Loss         -0.01   0.03    -0.40   0.69
## Conditional intercept            2.19   0.03    80.41   0.00

d <- interact_plot(fiti, pred = Isolation_Loss, modx = ChildComViolence, plot.points = TRUE, modx.values = "terciles", colors = "red", point.size = 1, point.alpha = 0.5, rug = T, jitter = 0.0, x.label = "Isolation & Loss", y.label = "PTSD symptoms", interval = T, legend.main = "Community violence", vary.lty = F)
## Medians of each tercile of ChildComViolence are -0.9581, -0.0565, 1.0809
d+ theme_2 + scale_y_continuous(limits = c(1.5, 2.6)) + scale_x_continuous(n.breaks = 10)

ggsave("hixcv.png", width = 6, height = 6, unit = "in", dpi = 300, bg = 'white')
ggsave("hixcv_leg.png", width = 10, height = 6, unit = "in", dpi = 300, bg = 'white')

Witnessing violence x Community violence

Didn’t survive false discovery rate

model_obsMod1 <- "
htq_ptsd_total ~ ConflictTrauma + Isolation_Loss + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + ChildComViolence + q102b_guess_age + WitnessViolence:ChildComViolence

ConflictTrauma ~~  Isolation_Loss  + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse  + ChildComViolence
Isolation_Loss ~~ ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + 0*ChildComViolence
ViolentVictimization ~~ Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual
ViolentVictimization~~ChildComViolence
Destruction_Injury ~~ WitnessViolence + ChildAbuse + ChildComViolence
WitnessViolence ~~ ChildAbuse + ChildNeglectSexual + ChildComViolence
ConflictTrauma ~~ ChildNeglectSexual
ChildAbuse ~~ ChildNeglectSexual
ChildAbuse ~~ ChildComViolence
ChildNeglectSexual ~~ 0*ChildComViolence
ChildNeglectSexual ~~ Destruction_Injury

ConflictTrauma ~ 0*1
Isolation_Loss ~ 0*1 
ViolentVictimization ~ 0*1 
Destruction_Injury ~ 0*1
WitnessViolence ~ 0*1
ChildAbuse ~0*1 
ChildNeglectSexual ~0*1 
ChildComViolence ~0*1 

"
fit_obs1 <- sem(model_obsMod1, data = datamale,estimator = "MLR", missing = "FIML.x", meanstructure = T, fixed.x = F)
datamale %>% select(WitnessViolence,ChildComViolence) %>% report_table()
## Variable         | n_Obs |  Mean |   SD | Median |  MAD |   Min |  Max | Skewness | Kurtosis | percentage_Missing
## -----------------------------------------------------------------------------------------------------------------
## WitnessViolence  |   642 |  0.90 | 0.79 |        | 0.61 | -1.61 | 2.64 |    -0.82 |     1.16 |               0.78
## ChildComViolence |   642 | -0.07 | 0.94 |        | 1.31 | -2.87 | 1.39 |    -0.06 |    -0.92 |               2.80
result2way2 <- probe2WayMC(fit_obs1, nameX=c("WitnessViolence","ChildComViolence","WitnessViolence:ChildComViolence"),
                          nameY="htq_ptsd_total", modVar="ChildComViolence", valProbe = c(-1, 0, 0.8))
result2way2
## $SimpleIntcept
##   ChildComViolence   est    se      z pvalue
## 1             -1.0 1.757 0.037 47.114      0
## 2              0.0 1.800 0.031 57.819      0
## 3              0.8 1.833 0.049 37.071      0
## 
## $SimpleSlope
##   ChildComViolence   est    se     z pvalue
## 1             -1.0 0.010 0.040 0.244  0.807
## 2              0.0 0.067 0.035 1.902  0.057
## 3              0.8 0.113 0.043 2.641  0.008
plotProbe(result2way2, xlim = c(-1.61, 2.64), xlab = "WitnessViolence",
  ylab = "PTSD Symptoms", legend = TRUE)

values_probe2 <- seq(from=-2.87, to = 1.39, by = 0.05)
result2way3 <- probe2WayMC(fit_obs1, nameX=c("WitnessViolence","ChildComViolence","WitnessViolence:ChildComViolence"),
                          nameY="htq_ptsd_total", modVar="ChildComViolence", valProbe=values_probe2)
result2way3
## $SimpleIntcept
##    ChildComViolence   est    se      z pvalue
## 1             -2.87 1.678 0.095 17.745      0
## 2             -2.82 1.681 0.093 18.091      0
## 3             -2.77 1.683 0.091 18.448      0
## 4             -2.72 1.685 0.090 18.819      0
## 5             -2.67 1.687 0.088 19.202      0
## 6             -2.62 1.689 0.086 19.600      0
## 7             -2.57 1.691 0.085 20.013      0
## 8             -2.52 1.693 0.083 20.441      0
## 9             -2.47 1.695 0.081 20.885      0
## 10            -2.42 1.697 0.080 21.347      0
## 11            -2.37 1.700 0.078 21.827      0
## 12            -2.32 1.702 0.076 22.326      0
## 13            -2.27 1.704 0.075 22.846      0
## 14            -2.22 1.706 0.073 23.386      0
## 15            -2.17 1.708 0.071 23.950      0
## 16            -2.12 1.710 0.070 24.537      0
## 17            -2.07 1.712 0.068 25.149      0
## 18            -2.02 1.714 0.066 25.787      0
## 19            -1.97 1.716 0.065 26.454      0
## 20            -1.92 1.718 0.063 27.150      0
## 21            -1.87 1.721 0.062 27.877      0
## 22            -1.82 1.723 0.060 28.637      0
## 23            -1.77 1.725 0.059 29.432      0
## 24            -1.72 1.727 0.057 30.263      0
## 25            -1.67 1.729 0.056 31.132      0
## 26            -1.62 1.731 0.054 32.041      0
## 27            -1.57 1.733 0.053 32.992      0
## 28            -1.52 1.735 0.051 33.986      0
## 29            -1.47 1.737 0.050 35.026      0
## 30            -1.42 1.740 0.048 36.113      0
## 31            -1.37 1.742 0.047 37.248      0
## 32            -1.32 1.744 0.045 38.431      0
## 33            -1.27 1.746 0.044 39.664      0
## 34            -1.22 1.748 0.043 40.946      0
## 35            -1.17 1.750 0.041 42.276      0
## 36            -1.12 1.752 0.040 43.652      0
## 37            -1.07 1.754 0.039 45.069      0
## 38            -1.02 1.756 0.038 46.524      0
## 39            -0.97 1.759 0.037 48.007      0
## 40            -0.92 1.761 0.036 49.510      0
## 41            -0.87 1.763 0.035 51.021      0
## 42            -0.82 1.765 0.034 52.523      0
## 43            -0.77 1.767 0.033 53.999      0
## 44            -0.72 1.769 0.032 55.426      0
## 45            -0.67 1.771 0.031 56.780      0
## 46            -0.62 1.773 0.031 58.035      0
## 47            -0.57 1.775 0.030 59.162      0
## 48            -0.52 1.778 0.030 60.134      0
## 49            -0.47 1.780 0.029 60.924      0
## 50            -0.42 1.782 0.029 61.510      0
## 51            -0.37 1.784 0.029 61.875      0
## 52            -0.32 1.786 0.029 62.007      0
## 53            -0.27 1.788 0.029 61.905      0
## 54            -0.22 1.790 0.029 61.573      0
## 55            -0.17 1.792 0.029 61.024      0
## 56            -0.12 1.794 0.030 60.276      0
## 57            -0.07 1.797 0.030 59.354      0
## 58            -0.02 1.799 0.031 58.282      0
## 59             0.03 1.801 0.032 57.090      0
## 60             0.08 1.803 0.032 55.804      0
## 61             0.13 1.805 0.033 54.450      0
## 62             0.18 1.807 0.034 53.051      0
## 63             0.23 1.809 0.035 51.628      0
## 64             0.28 1.811 0.036 50.197      0
## 65             0.33 1.813 0.037 48.773      0
## 66             0.38 1.816 0.038 47.368      0
## 67             0.43 1.818 0.040 45.991      0
## 68             0.48 1.820 0.041 44.648      0
## 69             0.53 1.822 0.042 43.344      0
## 70             0.58 1.824 0.043 42.082      0
## 71             0.63 1.826 0.045 40.866      0
## 72             0.68 1.828 0.046 39.695      0
## 73             0.73 1.830 0.047 38.569      0
## 74             0.78 1.832 0.049 37.490      0
## 75             0.83 1.835 0.050 36.455      0
## 76             0.88 1.837 0.052 35.464      0
## 77             0.93 1.839 0.053 34.516      0
## 78             0.98 1.841 0.055 33.608      0
## 79             1.03 1.843 0.056 32.739      0
## 80             1.08 1.845 0.058 31.908      0
## 81             1.13 1.847 0.059 31.113      0
## 82             1.18 1.849 0.061 30.352      0
## 83             1.23 1.851 0.062 29.623      0
## 84             1.28 1.854 0.064 28.925      0
## 85             1.33 1.856 0.066 28.257      0
## 86             1.38 1.858 0.067 27.616      0
## 
## $SimpleSlope
##    ChildComViolence    est    se      z pvalue
## 1             -2.87 -0.097 0.076 -1.280  0.200
## 2             -2.82 -0.094 0.075 -1.261  0.207
## 3             -2.77 -0.091 0.073 -1.241  0.215
## 4             -2.72 -0.088 0.072 -1.221  0.222
## 5             -2.67 -0.085 0.071 -1.199  0.230
## 6             -2.62 -0.083 0.070 -1.177  0.239
## 7             -2.57 -0.080 0.069 -1.154  0.248
## 8             -2.52 -0.077 0.068 -1.130  0.258
## 9             -2.47 -0.074 0.067 -1.106  0.269
## 10            -2.42 -0.071 0.066 -1.080  0.280
## 11            -2.37 -0.068 0.065 -1.054  0.292
## 12            -2.32 -0.065 0.064 -1.026  0.305
## 13            -2.27 -0.063 0.063 -0.998  0.318
## 14            -2.22 -0.060 0.062 -0.968  0.333
## 15            -2.17 -0.057 0.061 -0.938  0.348
## 16            -2.12 -0.054 0.060 -0.906  0.365
## 17            -2.07 -0.051 0.059 -0.873  0.383
## 18            -2.02 -0.048 0.058 -0.838  0.402
## 19            -1.97 -0.045 0.057 -0.803  0.422
## 20            -1.92 -0.043 0.056 -0.765  0.444
## 21            -1.87 -0.040 0.055 -0.727  0.467
## 22            -1.82 -0.037 0.054 -0.687  0.492
## 23            -1.77 -0.034 0.053 -0.645  0.519
## 24            -1.72 -0.031 0.052 -0.601  0.548
## 25            -1.67 -0.028 0.051 -0.556  0.578
## 26            -1.62 -0.026 0.050 -0.509  0.611
## 27            -1.57 -0.023 0.049 -0.460  0.645
## 28            -1.52 -0.020 0.048 -0.410  0.682
## 29            -1.47 -0.017 0.047 -0.357  0.721
## 30            -1.42 -0.014 0.047 -0.302  0.763
## 31            -1.37 -0.011 0.046 -0.245  0.806
## 32            -1.32 -0.008 0.045 -0.186  0.852
## 33            -1.27 -0.006 0.044 -0.125  0.901
## 34            -1.22 -0.003 0.043 -0.062  0.951
## 35            -1.17  0.000 0.043  0.004  0.997
## 36            -1.12  0.003 0.042  0.072  0.943
## 37            -1.07  0.006 0.041  0.142  0.887
## 38            -1.02  0.009 0.041  0.215  0.830
## 39            -0.97  0.012 0.040  0.289  0.772
## 40            -0.92  0.014 0.039  0.366  0.715
## 41            -0.87  0.017 0.039  0.444  0.657
## 42            -0.82  0.020 0.038  0.525  0.600
## 43            -0.77  0.023 0.038  0.607  0.544
## 44            -0.72  0.026 0.037  0.691  0.490
## 45            -0.67  0.029 0.037  0.776  0.438
## 46            -0.62  0.032 0.037  0.863  0.388
## 47            -0.57  0.034 0.036  0.950  0.342
## 48            -0.52  0.037 0.036  1.037  0.300
## 49            -0.47  0.040 0.036  1.125  0.260
## 50            -0.42  0.043 0.035  1.213  0.225
## 51            -0.37  0.046 0.035  1.301  0.193
## 52            -0.32  0.049 0.035  1.388  0.165
## 53            -0.27  0.052 0.035  1.473  0.141
## 54            -0.22  0.054 0.035  1.557  0.119
## 55            -0.17  0.057 0.035  1.640  0.101
## 56            -0.12  0.060 0.035  1.720  0.085
## 57            -0.07  0.063 0.035  1.797  0.072
## 58            -0.02  0.066 0.035  1.872  0.061
## 59             0.03  0.069 0.035  1.945  0.052
## 60             0.08  0.072 0.036  2.014  0.044
## 61             0.13  0.074 0.036  2.079  0.038
## 62             0.18  0.077 0.036  2.142  0.032
## 63             0.23  0.080 0.036  2.200  0.028
## 64             0.28  0.083 0.037  2.256  0.024
## 65             0.33  0.086 0.037  2.308  0.021
## 66             0.38  0.089 0.038  2.356  0.018
## 67             0.43  0.091 0.038  2.401  0.016
## 68             0.48  0.094 0.039  2.443  0.015
## 69             0.53  0.097 0.039  2.482  0.013
## 70             0.58  0.100 0.040  2.517  0.012
## 71             0.63  0.103 0.040  2.550  0.011
## 72             0.68  0.106 0.041  2.580  0.010
## 73             0.73  0.109 0.042  2.607  0.009
## 74             0.78  0.111 0.042  2.632  0.008
## 75             0.83  0.114 0.043  2.654  0.008
## 76             0.88  0.117 0.044  2.674  0.007
## 77             0.93  0.120 0.045  2.692  0.007
## 78             0.98  0.123 0.045  2.709  0.007
## 79             1.03  0.126 0.046  2.723  0.006
## 80             1.08  0.129 0.047  2.736  0.006
## 81             1.13  0.131 0.048  2.747  0.006
## 82             1.18  0.134 0.049  2.757  0.006
## 83             1.23  0.137 0.050  2.766  0.006
## 84             1.28  0.140 0.050  2.774  0.006
## 85             1.33  0.143 0.051  2.780  0.005
## 86             1.38  0.146 0.052  2.786  0.005
# PRETTIER GRAPHS
fiti <- lm(htq_ptsd_total ~ ConflictTrauma + Isolation_Loss + WitnessViolence*ChildComViolence + ChildNeglectSexual + ViolentVictimization + Destruction_Injury + ChildAbuse + q102b_guess_age, data = datamale)
ss <- sim_slopes(fiti, pred = WitnessViolence, modx = ChildComViolence, johnson_neyman = TRUE,control.fdr = TRUE)
ss  
## JOHNSON-NEYMAN INTERVAL 
## 
## The Johnson-Neyman interval could not be found. Is the p value for your
## interaction term below the specified alpha?
## 
## Interval calculated using false discovery rate adjusted t = 4.09 
## 
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of WitnessViolence when ChildComViolence = -0.99103911 (- 1 SD): 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.01   0.04     0.30   0.76
## 
## Slope of WitnessViolence when ChildComViolence = -0.05797478 (Mean): 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.06   0.04     1.76   0.08
## 
## Slope of WitnessViolence when ChildComViolence =  0.87508955 (+ 1 SD): 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.11   0.05     2.53   0.01
#plot(ss)
# probe_interaction(fiti, pred = WitnessViolence, modx = ChildComViolence, cond.int = TRUE,
#                   interval = TRUE,  jnplot = TRUE)
# interact_plot(fiti, pred = WitnessViolence, modx = ChildComViolence, plot.points = TRUE)

Migration violence x abuse

Implausible values

model_obsMod1 <- "
htq_ptsd_total ~ ConflictTrauma + Isolation_Loss + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + ChildComViolence + q102b_guess_age + Destruction_Injury:ChildAbuse

ConflictTrauma ~~  Isolation_Loss  + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse  + ChildComViolence
Isolation_Loss ~~ ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + 0*ChildComViolence
ViolentVictimization ~~ Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual
ViolentVictimization~~ChildComViolence
Destruction_Injury ~~ WitnessViolence + ChildAbuse + ChildComViolence
WitnessViolence ~~ ChildAbuse + ChildNeglectSexual + ChildComViolence
ConflictTrauma ~~ ChildNeglectSexual
ChildAbuse ~~ ChildNeglectSexual
ChildAbuse ~~ ChildComViolence
ChildNeglectSexual ~~ 0*ChildComViolence
ChildNeglectSexual ~~ Destruction_Injury

ConflictTrauma ~ 0*1
Isolation_Loss ~ 0*1 
ViolentVictimization ~ 0*1 
Destruction_Injury ~ 0*1
WitnessViolence ~ 0*1
ChildAbuse ~0*1 
ChildNeglectSexual ~0*1 
ChildComViolence ~0*1 

"
fit_obs1 <- sem(model_obsMod1, data = datamale,estimator = "MLR", missing = "FIML.x", meanstructure = T, fixed.x = F)
datamale %>% select(Destruction_Injury,ChildAbuse) %>% report_table()
## Variable           | n_Obs | Mean |   SD | Median |  MAD |   Min |  Max | Skewness | Kurtosis | percentage_Missing
## ------------------------------------------------------------------------------------------------------------------
## Destruction_Injury |   642 | 0.69 | 0.93 |        | 0.94 | -1.94 | 2.74 |    -0.26 |    -0.12 |               0.78
## ChildAbuse         |   642 | 0.47 | 0.99 |        | 0.92 | -1.95 | 2.61 |     0.45 |    -0.41 |               2.80
result2way2 <- probe2WayMC(fit_obs1, nameX=c("Destruction_Injury","ChildAbuse","Destruction_Injury:ChildAbuse"),
                          nameY="htq_ptsd_total", modVar="ChildAbuse", valProbe = c(-0.5, 0, 1.4))
result2way2
## $SimpleIntcept
##   ChildAbuse   est    se      z pvalue
## 1       -0.5 1.756 0.032 54.249      0
## 2        0.0 1.817 0.029 61.602      0
## 3        1.4 1.988 0.050 40.060      0
## 
## $SimpleSlope
##   ChildAbuse    est    se      z pvalue
## 1       -0.5 -0.038 0.032 -1.179  0.238
## 2        0.0 -0.021 0.030 -0.722  0.471
## 3        1.4  0.026 0.034  0.749  0.454
plotProbe(result2way2, xlim = c(-1.94, 2.74), xlab = "Migration violence",
  ylab = "PTSD Symptoms", legend = TRUE)

values_probe2 <- seq(from=-1.95, to = 2.61, by = 0.05)
result2way3 <- probe2WayMC(fit_obs1, nameX=c("Destruction_Injury","ChildAbuse","Destruction_Injury:ChildAbuse"),
                          nameY="htq_ptsd_total", modVar="ChildAbuse", valProbe=values_probe2)
result2way3
## $SimpleIntcept
##    ChildAbuse   est    se      z pvalue
## 1       -1.95 1.578 0.062 25.660      0
## 2       -1.90 1.584 0.060 26.283      0
## 3       -1.85 1.591 0.059 26.928      0
## 4       -1.80 1.597 0.058 27.597      0
## 5       -1.75 1.603 0.057 28.290      0
## 6       -1.70 1.609 0.055 29.009      0
## 7       -1.65 1.615 0.054 29.753      0
## 8       -1.60 1.621 0.053 30.524      0
## 9       -1.55 1.627 0.052 31.323      0
## 10      -1.50 1.633 0.051 32.151      0
## 11      -1.45 1.639 0.050 33.009      0
## 12      -1.40 1.646 0.049 33.896      0
## 13      -1.35 1.652 0.047 34.815      0
## 14      -1.30 1.658 0.046 35.766      0
## 15      -1.25 1.664 0.045 36.748      0
## 16      -1.20 1.670 0.044 37.762      0
## 17      -1.15 1.676 0.043 38.808      0
## 18      -1.10 1.682 0.042 39.885      0
## 19      -1.05 1.688 0.041 40.993      0
## 20      -1.00 1.694 0.040 42.130      0
## 21      -0.95 1.701 0.039 43.293      0
## 22      -0.90 1.707 0.038 44.481      0
## 23      -0.85 1.713 0.037 45.690      0
## 24      -0.80 1.719 0.037 46.915      0
## 25      -0.75 1.725 0.036 48.152      0
## 26      -0.70 1.731 0.035 49.394      0
## 27      -0.65 1.737 0.034 50.634      0
## 28      -0.60 1.743 0.034 51.863      0
## 29      -0.55 1.749 0.033 53.072      0
## 30      -0.50 1.756 0.032 54.249      0
## 31      -0.45 1.762 0.032 55.382      0
## 32      -0.40 1.768 0.031 56.460      0
## 33      -0.35 1.774 0.031 57.470      0
## 34      -0.30 1.780 0.030 58.397      0
## 35      -0.25 1.786 0.030 59.230      0
## 36      -0.20 1.792 0.030 59.955      0
## 37      -0.15 1.798 0.030 60.563      0
## 38      -0.10 1.804 0.030 61.044      0
## 39      -0.05 1.811 0.029 61.392      0
## 40       0.00 1.817 0.029 61.602      0
## 41       0.05 1.823 0.030 61.673      0
## 42       0.10 1.829 0.030 61.606      0
## 43       0.15 1.835 0.030 61.406      0
## 44       0.20 1.841 0.030 61.078      0
## 45       0.25 1.847 0.030 60.631      0
## 46       0.30 1.853 0.031 60.077      0
## 47       0.35 1.859 0.031 59.425      0
## 48       0.40 1.866 0.032 58.688      0
## 49       0.45 1.872 0.032 57.879      0
## 50       0.50 1.878 0.033 57.009      0
## 51       0.55 1.884 0.034 56.091      0
## 52       0.60 1.890 0.034 55.135      0
## 53       0.65 1.896 0.035 54.151      0
## 54       0.70 1.902 0.036 53.148      0
## 55       0.75 1.908 0.037 52.135      0
## 56       0.80 1.914 0.037 51.118      0
## 57       0.85 1.921 0.038 50.104      0
## 58       0.90 1.927 0.039 49.097      0
## 59       0.95 1.933 0.040 48.102      0
## 60       1.00 1.939 0.041 47.123      0
## 61       1.05 1.945 0.042 46.161      0
## 62       1.10 1.951 0.043 45.220      0
## 63       1.15 1.957 0.044 44.300      0
## 64       1.20 1.963 0.045 43.403      0
## 65       1.25 1.969 0.046 42.531      0
## 66       1.30 1.976 0.047 41.682      0
## 67       1.35 1.982 0.049 40.859      0
## 68       1.40 1.988 0.050 40.060      0
## 69       1.45 1.994 0.051 39.285      0
## 70       1.50 2.000 0.052 38.534      0
## 71       1.55 2.006 0.053 37.808      0
## 72       1.60 2.012 0.054 37.104      0
## 73       1.65 2.018 0.055 36.423      0
## 74       1.70 2.024 0.057 35.764      0
## 75       1.75 2.031 0.058 35.127      0
## 76       1.80 2.037 0.059 34.511      0
## 77       1.85 2.043 0.060 33.914      0
## 78       1.90 2.049 0.061 33.337      0
## 79       1.95 2.055 0.063 32.779      0
## 80       2.00 2.061 0.064 32.239      0
## 81       2.05 2.067 0.065 31.716      0
## 82       2.10 2.073 0.066 31.210      0
## 83       2.15 2.079 0.068 30.720      0
## 84       2.20 2.086 0.069 30.245      0
## 85       2.25 2.092 0.070 29.785      0
## 86       2.30 2.098 0.072 29.340      0
## 87       2.35 2.104 0.073 28.908      0
## 88       2.40 2.110 0.074 28.490      0
## 89       2.45 2.116 0.075 28.084      0
## 90       2.50 2.122 0.077 27.690      0
## 91       2.55 2.128 0.078 27.309      0
## 92       2.60 2.134 0.079 26.938      0
## 
## $SimpleSlope
##    ChildAbuse    est    se      z pvalue
## 1       -1.95 -0.087 0.049 -1.787  0.074
## 2       -1.90 -0.085 0.048 -1.778  0.075
## 3       -1.85 -0.083 0.047 -1.767  0.077
## 4       -1.80 -0.082 0.047 -1.757  0.079
## 5       -1.75 -0.080 0.046 -1.746  0.081
## 6       -1.70 -0.078 0.045 -1.734  0.083
## 7       -1.65 -0.077 0.045 -1.721  0.085
## 8       -1.60 -0.075 0.044 -1.708  0.088
## 9       -1.55 -0.073 0.043 -1.695  0.090
## 10      -1.50 -0.072 0.043 -1.680  0.093
## 11      -1.45 -0.070 0.042 -1.665  0.096
## 12      -1.40 -0.068 0.041 -1.649  0.099
## 13      -1.35 -0.067 0.041 -1.633  0.103
## 14      -1.30 -0.065 0.040 -1.615  0.106
## 15      -1.25 -0.063 0.040 -1.597  0.110
## 16      -1.20 -0.062 0.039 -1.577  0.115
## 17      -1.15 -0.060 0.039 -1.557  0.120
## 18      -1.10 -0.058 0.038 -1.535  0.125
## 19      -1.05 -0.057 0.037 -1.513  0.130
## 20      -1.00 -0.055 0.037 -1.489  0.136
## 21      -0.95 -0.053 0.036 -1.464  0.143
## 22      -0.90 -0.052 0.036 -1.438  0.150
## 23      -0.85 -0.050 0.035 -1.411  0.158
## 24      -0.80 -0.048 0.035 -1.382  0.167
## 25      -0.75 -0.047 0.034 -1.352  0.176
## 26      -0.70 -0.045 0.034 -1.320  0.187
## 27      -0.65 -0.043 0.034 -1.287  0.198
## 28      -0.60 -0.042 0.033 -1.253  0.210
## 29      -0.55 -0.040 0.033 -1.217  0.224
## 30      -0.50 -0.038 0.032 -1.179  0.238
## 31      -0.45 -0.036 0.032 -1.140  0.254
## 32      -0.40 -0.035 0.032 -1.100  0.271
## 33      -0.35 -0.033 0.031 -1.058  0.290
## 34      -0.30 -0.031 0.031 -1.014  0.311
## 35      -0.25 -0.030 0.031 -0.969  0.333
## 36      -0.20 -0.028 0.030 -0.922  0.356
## 37      -0.15 -0.026 0.030 -0.874  0.382
## 38      -0.10 -0.025 0.030 -0.825  0.410
## 39      -0.05 -0.023 0.030 -0.774  0.439
## 40       0.00 -0.021 0.030 -0.722  0.471
## 41       0.05 -0.020 0.029 -0.668  0.504
## 42       0.10 -0.018 0.029 -0.614  0.539
## 43       0.15 -0.016 0.029 -0.559  0.576
## 44       0.20 -0.015 0.029 -0.503  0.615
## 45       0.25 -0.013 0.029 -0.446  0.656
## 46       0.30 -0.011 0.029 -0.389  0.698
## 47       0.35 -0.010 0.029 -0.331  0.741
## 48       0.40 -0.008 0.029 -0.273  0.785
## 49       0.45 -0.006 0.029 -0.215  0.830
## 50       0.50 -0.005 0.029 -0.157  0.876
## 51       0.55 -0.003 0.029 -0.099  0.921
## 52       0.60 -0.001 0.029 -0.041  0.967
## 53       0.65  0.000 0.030  0.016  0.987
## 54       0.70  0.002 0.030  0.072  0.942
## 55       0.75  0.004 0.030  0.128  0.898
## 56       0.80  0.006 0.030  0.183  0.855
## 57       0.85  0.007 0.030  0.237  0.813
## 58       0.90  0.009 0.031  0.290  0.772
## 59       0.95  0.011 0.031  0.341  0.733
## 60       1.00  0.012 0.031  0.392  0.695
## 61       1.05  0.014 0.031  0.441  0.659
## 62       1.10  0.016 0.032  0.489  0.625
## 63       1.15  0.017 0.032  0.536  0.592
## 64       1.20  0.019 0.033  0.581  0.561
## 65       1.25  0.021 0.033  0.625  0.532
## 66       1.30  0.022 0.033  0.668  0.504
## 67       1.35  0.024 0.034  0.709  0.478
## 68       1.40  0.026 0.034  0.749  0.454
## 69       1.45  0.027 0.035  0.787  0.431
## 70       1.50  0.029 0.035  0.825  0.410
## 71       1.55  0.031 0.036  0.860  0.390
## 72       1.60  0.032 0.036  0.895  0.371
## 73       1.65  0.034 0.037  0.928  0.353
## 74       1.70  0.036 0.037  0.960  0.337
## 75       1.75  0.037 0.038  0.991  0.322
## 76       1.80  0.039 0.038  1.020  0.308
## 77       1.85  0.041 0.039  1.049  0.294
## 78       1.90  0.042 0.039  1.076  0.282
## 79       1.95  0.044 0.040  1.103  0.270
## 80       2.00  0.046 0.041  1.128  0.259
## 81       2.05  0.047 0.041  1.152  0.249
## 82       2.10  0.049 0.042  1.176  0.240
## 83       2.15  0.051 0.042  1.198  0.231
## 84       2.20  0.053 0.043  1.220  0.223
## 85       2.25  0.054 0.044  1.240  0.215
## 86       2.30  0.056 0.044  1.260  0.208
## 87       2.35  0.058 0.045  1.279  0.201
## 88       2.40  0.059 0.046  1.298  0.194
## 89       2.45  0.061 0.046  1.316  0.188
## 90       2.50  0.063 0.047  1.333  0.183
## 91       2.55  0.064 0.048  1.349  0.177
## 92       2.60  0.066 0.048  1.365  0.172
# PRETTIER GRAPHS
fiti <- lm(htq_ptsd_total ~ ConflictTrauma + Isolation_Loss + ChildComViolence + ChildNeglectSexual + ViolentVictimization + Destruction_Injury*ChildAbuse + WitnessViolence + q102b_guess_age, data = datamale)
ss <- sim_slopes(fiti, pred = Destruction_Injury, modx = ChildAbuse, johnson_neyman = TRUE,control.fdr = TRUE)
ss  
## JOHNSON-NEYMAN INTERVAL 
## 
## The Johnson-Neyman interval could not be found. Is the p value for your
## interaction term below the specified alpha?
## 
## Interval calculated using false discovery rate adjusted t = 4.09 
## 
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of Destruction_Injury when ChildAbuse = -0.5069424 (- 1 SD): 
## 
##    Est.   S.E.   t val.      p
## ------- ------ -------- ------
##   -0.04   0.04    -1.19   0.24
## 
## Slope of Destruction_Injury when ChildAbuse =  0.4819704 (Mean): 
## 
##    Est.   S.E.   t val.      p
## ------- ------ -------- ------
##   -0.01   0.03    -0.30   0.77
## 
## Slope of Destruction_Injury when ChildAbuse =  1.4708832 (+ 1 SD): 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.02   0.04     0.64   0.52
#plot(ss)
#probe_interaction(fiti, pred = Isolation_Loss, modx = ChildComViolence, cond.int = TRUE,
  #                interval = TRUE,  jnplot = TRUE)
#interact_plot(fiti, pred = Isolation_Loss, modx = ChildComViolence, plot.points = TRUE)

Witness x Abuse

model_obsMod1 <- "
htq_ptsd_total ~ ConflictTrauma + Isolation_Loss + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + ChildComViolence + q102b_guess_age + WitnessViolence:ChildAbuse

ConflictTrauma ~~  Isolation_Loss  + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse  + ChildComViolence
Isolation_Loss ~~ ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + 0*ChildComViolence
ViolentVictimization ~~ Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual
ViolentVictimization~~ChildComViolence
Destruction_Injury ~~ WitnessViolence + ChildAbuse + ChildComViolence
WitnessViolence ~~ ChildAbuse + ChildNeglectSexual + ChildComViolence
ConflictTrauma ~~ ChildNeglectSexual
ChildAbuse ~~ ChildNeglectSexual
ChildAbuse ~~ ChildComViolence
ChildNeglectSexual ~~ 0*ChildComViolence
ChildNeglectSexual ~~ Destruction_Injury

ConflictTrauma ~ 0*1
Isolation_Loss ~ 0*1 
ViolentVictimization ~ 0*1 
Destruction_Injury ~ 0*1
WitnessViolence ~ 0*1
ChildAbuse ~0*1 
ChildNeglectSexual ~0*1 
ChildComViolence ~0*1 

"
fit_obs1 <- sem(model_obsMod1, data = datamale,estimator = "MLR", missing = "FIML.x", meanstructure = T, fixed.x = F)
datamale %>% select(WitnessViolence,ChildAbuse) %>% report_table()
## Variable        | n_Obs | Mean |   SD | Median |  MAD |   Min |  Max | Skewness | Kurtosis | percentage_Missing
## ---------------------------------------------------------------------------------------------------------------
## WitnessViolence |   642 | 0.90 | 0.79 |        | 0.61 | -1.61 | 2.64 |    -0.82 |     1.16 |               0.78
## ChildAbuse      |   642 | 0.47 | 0.99 |        | 0.92 | -1.95 | 2.61 |     0.45 |    -0.41 |               2.80
result2way2 <- probe2WayMC(fit_obs1, nameX=c("WitnessViolence","ChildAbuse","WitnessViolence:ChildAbuse"),
                          nameY="htq_ptsd_total", modVar="ChildAbuse", valProbe = c(-0.5, 0, 1.4))
result2way2
## $SimpleIntcept
##   ChildAbuse   est    se      z pvalue
## 1       -0.5 1.771 0.033 53.291      0
## 2        0.0 1.817 0.029 61.740      0
## 3        1.4 1.945 0.065 30.147      0
## 
## $SimpleSlope
##   ChildAbuse   est    se     z pvalue
## 1       -0.5 0.017 0.038 0.455  0.649
## 2        0.0 0.044 0.035 1.245  0.213
## 3        1.4 0.117 0.047 2.480  0.013
plotProbe(result2way2, xlim = c(-1.61, 2.64), xlab = "Migration violence",
  ylab = "PTSD Symptoms", legend = TRUE)

values_probe2 <- seq(from=-1.95, to = 2.61, by = 0.05)
result2way3 <- probe2WayMC(fit_obs1, nameX=c("WitnessViolence","ChildAbuse","WitnessViolence:ChildAbuse"),
                          nameY="htq_ptsd_total", modVar="ChildAbuse", valProbe=values_probe2)
result2way3
## $SimpleIntcept
##    ChildAbuse   est    se      z pvalue
## 1       -1.95 1.638 0.078 21.128      0
## 2       -1.90 1.642 0.076 21.687      0
## 3       -1.85 1.647 0.074 22.270      0
## 4       -1.80 1.652 0.072 22.879      0
## 5       -1.75 1.656 0.070 23.516      0
## 6       -1.70 1.661 0.069 24.183      0
## 7       -1.65 1.665 0.067 24.880      0
## 8       -1.60 1.670 0.065 25.611      0
## 9       -1.55 1.675 0.063 26.377      0
## 10      -1.50 1.679 0.062 27.180      0
## 11      -1.45 1.684 0.060 28.023      0
## 12      -1.40 1.688 0.058 28.907      0
## 13      -1.35 1.693 0.057 29.835      0
## 14      -1.30 1.697 0.055 30.810      0
## 15      -1.25 1.702 0.053 31.833      0
## 16      -1.20 1.707 0.052 32.907      0
## 17      -1.15 1.711 0.050 34.034      0
## 18      -1.10 1.716 0.049 35.216      0
## 19      -1.05 1.720 0.047 36.455      0
## 20      -1.00 1.725 0.046 37.753      0
## 21      -0.95 1.730 0.044 39.108      0
## 22      -0.90 1.734 0.043 40.522      0
## 23      -0.85 1.739 0.041 41.993      0
## 24      -0.80 1.743 0.040 43.516      0
## 25      -0.75 1.748 0.039 45.088      0
## 26      -0.70 1.752 0.038 46.701      0
## 27      -0.65 1.757 0.036 48.343      0
## 28      -0.60 1.762 0.035 50.002      0
## 29      -0.55 1.766 0.034 51.658      0
## 30      -0.50 1.771 0.033 53.291      0
## 31      -0.45 1.775 0.032 54.873      0
## 32      -0.40 1.780 0.032 56.376      0
## 33      -0.35 1.785 0.031 57.765      0
## 34      -0.30 1.789 0.030 59.006      0
## 35      -0.25 1.794 0.030 60.064      0
## 36      -0.20 1.798 0.030 60.908      0
## 37      -0.15 1.803 0.029 61.512      0
## 38      -0.10 1.807 0.029 61.856      0
## 39      -0.05 1.812 0.029 61.932      0
## 40       0.00 1.817 0.029 61.740      0
## 41       0.05 1.821 0.030 61.292      0
## 42       0.10 1.826 0.030 60.608      0
## 43       0.15 1.830 0.031 59.715      0
## 44       0.20 1.835 0.031 58.644      0
## 45       0.25 1.840 0.032 57.430      0
## 46       0.30 1.844 0.033 56.105      0
## 47       0.35 1.849 0.034 54.700      0
## 48       0.40 1.853 0.035 53.244      0
## 49       0.45 1.858 0.036 51.762      0
## 50       0.50 1.862 0.037 50.272      0
## 51       0.55 1.867 0.038 48.793      0
## 52       0.60 1.872 0.040 47.337      0
## 53       0.65 1.876 0.041 45.914      0
## 54       0.70 1.881 0.042 44.531      0
## 55       0.75 1.885 0.044 43.193      0
## 56       0.80 1.890 0.045 41.904      0
## 57       0.85 1.895 0.047 40.665      0
## 58       0.90 1.899 0.048 39.476      0
## 59       0.95 1.904 0.050 38.338      0
## 60       1.00 1.908 0.051 37.250      0
## 61       1.05 1.913 0.053 36.211      0
## 62       1.10 1.917 0.054 35.219      0
## 63       1.15 1.922 0.056 34.272      0
## 64       1.20 1.927 0.058 33.368      0
## 65       1.25 1.931 0.059 32.506      0
## 66       1.30 1.936 0.061 31.683      0
## 67       1.35 1.940 0.063 30.897      0
## 68       1.40 1.945 0.065 30.147      0
## 69       1.45 1.950 0.066 29.430      0
## 70       1.50 1.954 0.068 28.745      0
## 71       1.55 1.959 0.070 28.091      0
## 72       1.60 1.963 0.071 27.464      0
## 73       1.65 1.968 0.073 26.865      0
## 74       1.70 1.972 0.075 26.291      0
## 75       1.75 1.977 0.077 25.740      0
## 76       1.80 1.982 0.079 25.213      0
## 77       1.85 1.986 0.080 24.707      0
## 78       1.90 1.991 0.082 24.221      0
## 79       1.95 1.995 0.084 23.755      0
## 80       2.00 2.000 0.086 23.307      0
## 81       2.05 2.005 0.088 22.876      0
## 82       2.10 2.009 0.089 22.461      0
## 83       2.15 2.014 0.091 22.062      0
## 84       2.20 2.018 0.093 21.677      0
## 85       2.25 2.023 0.095 21.307      0
## 86       2.30 2.028 0.097 20.949      0
## 87       2.35 2.032 0.099 20.604      0
## 88       2.40 2.037 0.100 20.272      0
## 89       2.45 2.041 0.102 19.950      0
## 90       2.50 2.046 0.104 19.640      0
## 91       2.55 2.050 0.106 19.339      0
## 92       2.60 2.055 0.108 19.049      0
## 
## $SimpleSlope
##    ChildAbuse    est    se      z pvalue
## 1       -1.95 -0.058 0.063 -0.935  0.350
## 2       -1.90 -0.056 0.061 -0.908  0.364
## 3       -1.85 -0.053 0.060 -0.880  0.379
## 4       -1.80 -0.051 0.059 -0.851  0.395
## 5       -1.75 -0.048 0.058 -0.821  0.412
## 6       -1.70 -0.045 0.057 -0.790  0.430
## 7       -1.65 -0.043 0.056 -0.757  0.449
## 8       -1.60 -0.040 0.055 -0.723  0.470
## 9       -1.55 -0.038 0.055 -0.688  0.491
## 10      -1.50 -0.035 0.054 -0.651  0.515
## 11      -1.45 -0.032 0.053 -0.613  0.540
## 12      -1.40 -0.030 0.052 -0.574  0.566
## 13      -1.35 -0.027 0.051 -0.533  0.594
## 14      -1.30 -0.024 0.050 -0.490  0.624
## 15      -1.25 -0.022 0.049 -0.445  0.656
## 16      -1.20 -0.019 0.048 -0.399  0.690
## 17      -1.15 -0.017 0.047 -0.351  0.726
## 18      -1.10 -0.014 0.046 -0.301  0.763
## 19      -1.05 -0.011 0.046 -0.249  0.803
## 20      -1.00 -0.009 0.045 -0.195  0.845
## 21      -0.95 -0.006 0.044 -0.139  0.889
## 22      -0.90 -0.004 0.043 -0.081  0.935
## 23      -0.85 -0.001 0.043 -0.021  0.983
## 24      -0.80  0.002 0.042  0.041  0.967
## 25      -0.75  0.004 0.041  0.105  0.916
## 26      -0.70  0.007 0.041  0.171  0.864
## 27      -0.65  0.010 0.040  0.239  0.811
## 28      -0.60  0.012 0.039  0.310  0.757
## 29      -0.55  0.015 0.039  0.382  0.703
## 30      -0.50  0.017 0.038  0.455  0.649
## 31      -0.45  0.020 0.038  0.531  0.596
## 32      -0.40  0.023 0.037  0.607  0.544
## 33      -0.35  0.025 0.037  0.685  0.493
## 34      -0.30  0.028 0.036  0.764  0.445
## 35      -0.25  0.030 0.036  0.844  0.399
## 36      -0.20  0.033 0.036  0.924  0.355
## 37      -0.15  0.036 0.036  1.005  0.315
## 38      -0.10  0.038 0.035  1.085  0.278
## 39      -0.05  0.041 0.035  1.166  0.244
## 40       0.00  0.044 0.035  1.245  0.213
## 41       0.05  0.046 0.035  1.323  0.186
## 42       0.10  0.049 0.035  1.400  0.161
## 43       0.15  0.051 0.035  1.475  0.140
## 44       0.20  0.054 0.035  1.549  0.121
## 45       0.25  0.057 0.035  1.620  0.105
## 46       0.30  0.059 0.035  1.689  0.091
## 47       0.35  0.062 0.035  1.754  0.079
## 48       0.40  0.064 0.035  1.818  0.069
## 49       0.45  0.067 0.036  1.878  0.060
## 50       0.50  0.070 0.036  1.935  0.053
## 51       0.55  0.072 0.036  1.989  0.047
## 52       0.60  0.075 0.037  2.039  0.041
## 53       0.65  0.078 0.037  2.087  0.037
## 54       0.70  0.080 0.038  2.131  0.033
## 55       0.75  0.083 0.038  2.172  0.030
## 56       0.80  0.085 0.039  2.211  0.027
## 57       0.85  0.088 0.039  2.246  0.025
## 58       0.90  0.091 0.040  2.279  0.023
## 59       0.95  0.093 0.040  2.309  0.021
## 60       1.00  0.096 0.041  2.336  0.019
## 61       1.05  0.098 0.042  2.361  0.018
## 62       1.10  0.101 0.042  2.384  0.017
## 63       1.15  0.104 0.043  2.404  0.016
## 64       1.20  0.106 0.044  2.423  0.015
## 65       1.25  0.109 0.045  2.440  0.015
## 66       1.30  0.112 0.045  2.455  0.014
## 67       1.35  0.114 0.046  2.468  0.014
## 68       1.40  0.117 0.047  2.480  0.013
## 69       1.45  0.119 0.048  2.491  0.013
## 70       1.50  0.122 0.049  2.500  0.012
## 71       1.55  0.125 0.050  2.509  0.012
## 72       1.60  0.127 0.051  2.516  0.012
## 73       1.65  0.130 0.051  2.522  0.012
## 74       1.70  0.132 0.052  2.528  0.011
## 75       1.75  0.135 0.053  2.532  0.011
## 76       1.80  0.138 0.054  2.536  0.011
## 77       1.85  0.140 0.055  2.539  0.011
## 78       1.90  0.143 0.056  2.541  0.011
## 79       1.95  0.146 0.057  2.543  0.011
## 80       2.00  0.148 0.058  2.545  0.011
## 81       2.05  0.151 0.059  2.546  0.011
## 82       2.10  0.153 0.060  2.546  0.011
## 83       2.15  0.156 0.061  2.547  0.011
## 84       2.20  0.159 0.062  2.546  0.011
## 85       2.25  0.161 0.063  2.546  0.011
## 86       2.30  0.164 0.064  2.545  0.011
## 87       2.35  0.166 0.065  2.544  0.011
## 88       2.40  0.169 0.066  2.543  0.011
## 89       2.45  0.172 0.068  2.542  0.011
## 90       2.50  0.174 0.069  2.540  0.011
## 91       2.55  0.177 0.070  2.538  0.011
## 92       2.60  0.179 0.071  2.536  0.011
# PRETTIER GRAPHS
fiti <- lm(htq_ptsd_total ~ ConflictTrauma + Isolation_Loss + ChildComViolence + ChildNeglectSexual + ViolentVictimization + Destruction_Injury + WitnessViolence*ChildAbuse + q102b_guess_age, data = datamale)
ss <- sim_slopes(fiti, pred = WitnessViolence, modx = ChildAbuse, johnson_neyman = TRUE,control.fdr = TRUE)
ss  
## JOHNSON-NEYMAN INTERVAL 
## 
## When ChildAbuse is INSIDE the interval [1.04, 7.43], the slope of
## WitnessViolence is p < .05.
## 
## Note: The range of observed values of ChildAbuse is [-1.95, 2.61]
## 
## Interval calculated using false discovery rate adjusted t = 2.39 
## 
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of WitnessViolence when ChildAbuse = -0.5069424 (- 1 SD): 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.02   0.04     0.38   0.70
## 
## Slope of WitnessViolence when ChildAbuse =  0.4819704 (Mean): 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.07   0.04     1.87   0.06
## 
## Slope of WitnessViolence when ChildAbuse =  1.4708832 (+ 1 SD): 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.12   0.05     2.56   0.01
plot(ss)

probe_interaction(fiti, pred = WitnessViolence, modx = ChildAbuse, cond.int = TRUE,  interval = TRUE,  jnplot = TRUE)
## JOHNSON-NEYMAN INTERVAL 
## 
## When ChildAbuse is OUTSIDE the interval [-14.71, 0.56], the slope of
## WitnessViolence is p < .05.
## 
## Note: The range of observed values of ChildAbuse is [-1.95, 2.61]

## SIMPLE SLOPES ANALYSIS 
## 
## When ChildAbuse = -0.5069424 (- 1 SD): 
## 
##                                  Est.   S.E.   t val.      p
## ------------------------------ ------ ------ -------- ------
## Slope of WitnessViolence         0.02   0.04     0.38   0.70
## Conditional intercept            1.95   0.03    67.36   0.00
## 
## When ChildAbuse =  0.4819704 (Mean): 
## 
##                                  Est.   S.E.   t val.      p
## ------------------------------ ------ ------ -------- ------
## Slope of WitnessViolence         0.07   0.04     1.87   0.06
## Conditional intercept            2.09   0.02   118.05   0.00
## 
## When ChildAbuse =  1.4708832 (+ 1 SD): 
## 
##                                  Est.   S.E.   t val.      p
## ------------------------------ ------ ------ -------- ------
## Slope of WitnessViolence         0.12   0.05     2.56   0.01
## Conditional intercept            2.23   0.03    73.61   0.00

d <- interact_plot(fiti, pred = WitnessViolence, modx = ChildAbuse, plot.points = TRUE, modx.values = "terciles", colors = "red", point.size = 1, point.alpha = 0.5, rug = T, jitter = 0.0, x.label = "Witness violence", y.label = "PTSD symptoms", interval = T, legend.main = "Physical &\nemotional abuse", vary.lty = F)
## Medians of each tercile of ChildAbuse are -0.396, 0.244, 1.669
d+ theme_2 + scale_y_continuous(limits = c(1.5, 2.6)) + scale_x_continuous(n.breaks = 10, limits = c(-1.5, 2.5))

ggsave("hwxa.png", width = 6, height = 6, unit = "in", dpi = 300, bg = 'white')
ggsave("hwxa_leg.png", width = 10, height = 6, unit = "in", dpi = 300, bg = 'white')

Logistic regression models predicting PTSD diagnosis in males & females

I’ll only use the PTSD-4 scale because it includes all items, not just selected ones. Original HTQ4 total scale has 40 items, and we only asked 33. However, we did ask all that go into PTSD4.

dataf <- dataf %>% mutate(PTSD = case_when(htq_ptsd_dsm >= 2.5 ~ 1,
                                  htq_ptsd_dsm < 2.5 ~ 0,
                                  is.na(htq_ptsd_dsm) ~ NA_real_)) %>% mutate(PTSD = as.ordered(PTSD))

datafemale = dataf %>% filter(respondent_cat == 0) %>% dplyr::rename(Age = q102b_guess_age)



model <- glm(PTSD ~ ConflictTrauma + Isolation_Loss + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + ChildComViolence + Age, data = datafemale, family = binomial)
performance::r2(model)
## # R2 for Logistic Regression
##   Tjur's R2: 0.118
# Weak explanatory power
#check_model(model) #RUN IN BIG SCREEN
model_parameters(model)
## Parameter            | Log-Odds |       SE |         95% CI |      z |      p
## -----------------------------------------------------------------------------
## (Intercept)          |    -0.79 |     0.06 | [-0.90, -0.69] | -14.43 | < .001
## ConflictTrauma       |     0.07 |     0.09 | [-0.10,  0.24] |   0.81 | 0.416 
## Isolation Loss       |     0.20 |     0.06 | [ 0.07,  0.32] |   3.07 | 0.002 
## ViolentVictimization |     0.32 |     0.10 | [ 0.12,  0.53] |   3.10 | 0.002 
## Destruction Injury   |     0.03 |     0.11 | [-0.18,  0.24] |   0.29 | 0.772 
## WitnessViolence      |     0.10 |     0.09 | [-0.07,  0.26] |   1.15 | 0.252 
## ChildAbuse           |     0.32 |     0.07 | [ 0.19,  0.45] |   4.76 | < .001
## ChildNeglectSexual   |     0.25 |     0.07 | [ 0.12,  0.38] |   3.84 | < .001
## ChildComViolence     | 2.28e-03 |     0.06 | [-0.12,  0.12] |   0.04 | 0.970 
## Age                  |     0.04 | 9.84e-03 | [ 0.02,  0.06] |   4.37 | < .001
## 
## Uncertainty intervals (profile-likelihood) and p-values (two-tailed)
##   computed using a Wald z-distribution approximation.
## 
## The model has a log- or logit-link. Consider using `exponentiate =
##   TRUE` to interpret coefficients as ratios.
model_parameters(model, standardize = "refit")
## Parameter            | Log-Odds |   SE |         95% CI |      z |      p
## -------------------------------------------------------------------------
## (Intercept)          |    -1.08 | 0.05 | [-1.19, -0.98] | -20.10 | < .001
## ConflictTrauma       |     0.07 | 0.08 | [-0.09,  0.23] |   0.81 | 0.416 
## Isolation Loss       |     0.19 | 0.06 | [ 0.07,  0.32] |   3.07 | 0.002 
## ViolentVictimization |     0.23 | 0.08 | [ 0.09,  0.38] |   3.10 | 0.002 
## Destruction Injury   |     0.03 | 0.10 | [-0.17,  0.23] |   0.29 | 0.772 
## WitnessViolence      |     0.09 | 0.08 | [-0.06,  0.24] |   1.15 | 0.252 
## ChildAbuse           |     0.31 | 0.06 | [ 0.18,  0.44] |   4.76 | < .001
## ChildNeglectSexual   |     0.22 | 0.06 | [ 0.11,  0.34] |   3.84 | < .001
## ChildComViolence     | 2.26e-03 | 0.06 | [-0.11,  0.12] |   0.04 | 0.970 
## Age                  |     0.22 | 0.05 | [ 0.12,  0.32] |   4.37 | < .001
## 
## Uncertainty intervals (profile-likelihood) and p-values (two-tailed)
##   computed using a Wald z-distribution approximation.
plot(parameters(model, standardize = "refit")) +
  ggplot2::labs(title = "Log-Odds of childhood and war trauma on a PTSD diagnosis\nin pregnant women")

ggsave("logregfemales.png", width =6, height = 6.2, unit = "in", dpi = 300, bg = 'white')
select_parameters(model, standardize = "refit") 
## 
## Call:  glm(formula = PTSD ~ ConflictTrauma + Isolation_Loss + ViolentVictimization + 
##     ChildAbuse + ChildNeglectSexual + Age, family = binomial, 
##     data = datafemale)
## 
## Coefficients:
##          (Intercept)        ConflictTrauma        Isolation_Loss  
##             -0.79540               0.11823               0.21461  
## ViolentVictimization            ChildAbuse    ChildNeglectSexual  
##              0.39543               0.32030               0.24721  
##                  Age  
##              0.04269  
## 
## Degrees of Freedom: 2123 Total (i.e. Null);  2117 Residual
##   (199 observations deleted due to missingness)
## Null Deviance:       2508 
## Residual Deviance: 2262  AIC: 2276
exp(0.21461)
## [1] 1.239378
exp(0.39543)
## [1] 1.485023
exp(0.32030)
## [1] 1.377541
exp(0.24721)
## [1] 1.280448
report(model)
## We fitted a logistic model (estimated using ML) to predict PTSD with
## ConflictTrauma, Isolation_Loss, ViolentVictimization, Destruction_Injury,
## WitnessViolence, ChildAbuse, ChildNeglectSexual, ChildComViolence and Age
## (formula: PTSD ~ ConflictTrauma + Isolation_Loss + ViolentVictimization +
## Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual +
## ChildComViolence + Age). The model's explanatory power is weak (Tjur's R2 =
## 0.12). The model's intercept, corresponding to ConflictTrauma = 0,
## Isolation_Loss = 0, ViolentVictimization = 0, Destruction_Injury = 0,
## WitnessViolence = 0, ChildAbuse = 0, ChildNeglectSexual = 0, ChildComViolence =
## 0 and Age = 0, is at -0.79 (95% CI [-0.90, -0.69], p < .001). Within this
## model:
## 
##   - The effect of ConflictTrauma is statistically non-significant and positive
## (beta = 0.07, 95% CI [-0.10, 0.24], p = 0.416; Std. beta = 0.07, 95% CI [-0.09,
## 0.23])
##   - The effect of Isolation Loss is statistically significant and positive (beta
## = 0.20, 95% CI [0.07, 0.32], p = 0.002; Std. beta = 0.19, 95% CI [0.07, 0.32])
##   - The effect of ViolentVictimization is statistically significant and positive
## (beta = 0.32, 95% CI [0.12, 0.53], p = 0.002; Std. beta = 0.23, 95% CI [0.09,
## 0.38])
##   - The effect of Destruction Injury is statistically non-significant and
## positive (beta = 0.03, 95% CI [-0.18, 0.24], p = 0.772; Std. beta = 0.03, 95%
## CI [-0.17, 0.23])
##   - The effect of WitnessViolence is statistically non-significant and positive
## (beta = 0.10, 95% CI [-0.07, 0.26], p = 0.252; Std. beta = 0.09, 95% CI [-0.06,
## 0.24])
##   - The effect of ChildAbuse is statistically significant and positive (beta =
## 0.32, 95% CI [0.19, 0.45], p < .001; Std. beta = 0.31, 95% CI [0.18, 0.44])
##   - The effect of ChildNeglectSexual is statistically significant and positive
## (beta = 0.25, 95% CI [0.12, 0.38], p < .001; Std. beta = 0.22, 95% CI [0.11,
## 0.34])
##   - The effect of ChildComViolence is statistically non-significant and positive
## (beta = 2.28e-03, 95% CI [-0.12, 0.12], p = 0.970; Std. beta = 2.26e-03, 95% CI
## [-0.11, 0.12])
##   - The effect of Age is statistically significant and positive (beta = 0.04, 95%
## CI [0.02, 0.06], p < .001; Std. beta = 0.22, 95% CI [0.12, 0.32])
## 
## Standardized parameters were obtained by fitting the model on a standardized
## version of the dataset. 95% Confidence Intervals (CIs) and p-values were
## computed using a Wald z-distribution approximation.
####
datamale = dataf %>% filter(respondent_cat == 1) %>% dplyr::rename(Age = q102b_guess_age)

model <- glm(PTSD ~ ConflictTrauma + Isolation_Loss + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + ChildComViolence + Age, data = datamale, family = binomial)
performance::r2(model)
## # R2 for Logistic Regression
##   Tjur's R2: 0.303
# Substanti explanatory power
#check_model(model) RUN IN BIG SCREEN
model_parameters(model)
## Parameter            | Log-Odds |   SE |         95% CI |     z |      p
## ------------------------------------------------------------------------
## (Intercept)          |    -1.76 | 0.22 | [-2.21, -1.35] | -8.03 | < .001
## ConflictTrauma       |     0.26 | 0.15 | [-0.03,  0.55] |  1.76 | 0.079 
## Isolation Loss       |    -0.21 | 0.12 | [-0.45,  0.02] | -1.75 | 0.080 
## ViolentVictimization |     0.74 | 0.17 | [ 0.41,  1.08] |  4.35 | < .001
## Destruction Injury   |    -0.11 | 0.19 | [-0.48,  0.25] | -0.60 | 0.550 
## WitnessViolence      |     0.28 | 0.22 | [-0.15,  0.72] |  1.25 | 0.210 
## ChildAbuse           |     0.56 | 0.14 | [ 0.29,  0.83] |  4.01 | < .001
## ChildNeglectSexual   |     0.04 | 0.09 | [-0.15,  0.22] |  0.39 | 0.695 
## ChildComViolence     |     0.34 | 0.13 | [ 0.08,  0.61] |  2.56 | 0.010 
## Age                  |     0.03 | 0.02 | [-0.01,  0.06] |  1.61 | 0.108
## 
## Uncertainty intervals (profile-likelihood) and p-values (two-tailed)
##   computed using a Wald z-distribution approximation.
model_parameters(model, standardize = "refit")
## Parameter            | Log-Odds |   SE |         95% CI |     z |      p
## ------------------------------------------------------------------------
## (Intercept)          |    -0.39 | 0.10 | [-0.58, -0.19] | -3.85 | < .001
## ConflictTrauma       |     0.28 | 0.16 | [-0.03,  0.60] |  1.76 | 0.079 
## Isolation Loss       |    -0.20 | 0.11 | [-0.43,  0.02] | -1.75 | 0.080 
## ViolentVictimization |     0.73 | 0.17 | [ 0.40,  1.06] |  4.35 | < .001
## Destruction Injury   |    -0.10 | 0.17 | [-0.44,  0.23] | -0.60 | 0.550 
## WitnessViolence      |     0.22 | 0.17 | [-0.12,  0.57] |  1.25 | 0.210 
## ChildAbuse           |     0.55 | 0.14 | [ 0.28,  0.83] |  4.01 | < .001
## ChildNeglectSexual   |     0.04 | 0.11 | [-0.17,  0.25] |  0.39 | 0.695 
## ChildComViolence     |     0.32 | 0.13 | [ 0.08,  0.57] |  2.56 | 0.010 
## Age                  |     0.17 | 0.10 | [-0.03,  0.37] |  1.61 | 0.108
## 
## Uncertainty intervals (profile-likelihood) and p-values (two-tailed)
##   computed using a Wald z-distribution approximation.
plot(parameters(model, standardize = "refit")) +
  ggplot2::labs(title = "Log-Odds of childhood and war trauma on a PTSD diagnosis\nin fathers")

ggsave("logregmales.png", width =6, height = 6.2, unit = "in", dpi = 300, bg = 'white')
select_parameters(model, standardize = "refit") 
## 
## Call:  glm(formula = PTSD ~ ConflictTrauma + Isolation_Loss + ViolentVictimization + 
##     ChildAbuse + ChildComViolence + Age, family = binomial, data = datamale)
## 
## Coefficients:
##          (Intercept)        ConflictTrauma        Isolation_Loss  
##              -1.6817                0.2623               -0.2013  
## ViolentVictimization            ChildAbuse      ChildComViolence  
##               0.8320                0.5869                0.3297  
##                  Age  
##               0.0240  
## 
## Degrees of Freedom: 600 Total (i.e. Null);  594 Residual
##   (41 observations deleted due to missingness)
## Null Deviance:       821.1 
## Residual Deviance: 621   AIC: 635
exp(0.8320)
## [1] 2.29791
exp(0.5869)
## [1] 1.798405
exp(0.3297)
## [1] 1.390551
report(model)
## We fitted a logistic model (estimated using ML) to predict PTSD with
## ConflictTrauma, Isolation_Loss, ViolentVictimization, Destruction_Injury,
## WitnessViolence, ChildAbuse, ChildNeglectSexual, ChildComViolence and Age
## (formula: PTSD ~ ConflictTrauma + Isolation_Loss + ViolentVictimization +
## Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual +
## ChildComViolence + Age). The model's explanatory power is substantial (Tjur's
## R2 = 0.30). The model's intercept, corresponding to ConflictTrauma = 0,
## Isolation_Loss = 0, ViolentVictimization = 0, Destruction_Injury = 0,
## WitnessViolence = 0, ChildAbuse = 0, ChildNeglectSexual = 0, ChildComViolence =
## 0 and Age = 0, is at -1.76 (95% CI [-2.21, -1.35], p < .001). Within this
## model:
## 
##   - The effect of ConflictTrauma is statistically non-significant and positive
## (beta = 0.26, 95% CI [-0.03, 0.55], p = 0.079; Std. beta = 0.28, 95% CI [-0.03,
## 0.60])
##   - The effect of Isolation Loss is statistically non-significant and negative
## (beta = -0.21, 95% CI [-0.45, 0.02], p = 0.080; Std. beta = -0.20, 95% CI
## [-0.43, 0.02])
##   - The effect of ViolentVictimization is statistically significant and positive
## (beta = 0.74, 95% CI [0.41, 1.08], p < .001; Std. beta = 0.73, 95% CI [0.40,
## 1.06])
##   - The effect of Destruction Injury is statistically non-significant and
## negative (beta = -0.11, 95% CI [-0.48, 0.25], p = 0.550; Std. beta = -0.10, 95%
## CI [-0.44, 0.23])
##   - The effect of WitnessViolence is statistically non-significant and positive
## (beta = 0.28, 95% CI [-0.15, 0.72], p = 0.210; Std. beta = 0.22, 95% CI [-0.12,
## 0.57])
##   - The effect of ChildAbuse is statistically significant and positive (beta =
## 0.56, 95% CI [0.29, 0.83], p < .001; Std. beta = 0.55, 95% CI [0.28, 0.83])
##   - The effect of ChildNeglectSexual is statistically non-significant and
## positive (beta = 0.04, 95% CI [-0.15, 0.22], p = 0.695; Std. beta = 0.04, 95%
## CI [-0.17, 0.25])
##   - The effect of ChildComViolence is statistically significant and positive
## (beta = 0.34, 95% CI [0.08, 0.61], p = 0.010; Std. beta = 0.32, 95% CI [0.08,
## 0.57])
##   - The effect of Age is statistically non-significant and positive (beta = 0.03,
## 95% CI [-5.57e-03, 0.06], p = 0.108; Std. beta = 0.17, 95% CI [-0.03, 0.37])
## 
## Standardized parameters were obtained by fitting the model on a standardized
## version of the dataset. 95% Confidence Intervals (CIs) and p-values were
## computed using a Wald z-distribution approximation.
datafemale %>% select(PTSD) %>% mutate_at(vars(c(PTSD)),
     funs(as.ordered(.))) %>% report_table()
## Variable |   Level | n_Obs | percentage_Obs
## -------------------------------------------
## PTSD     |       0 |  1572 |          67.67
## PTSD     |       1 |   615 |          26.47
## PTSD     | missing |   136 |           5.85
datamale %>% select(PTSD) %>% mutate_at(vars(c(PTSD)),
     funs(as.ordered(.))) %>% report_table()
## Variable |   Level | n_Obs | percentage_Obs
## -------------------------------------------
## PTSD     |       0 |   357 |          55.61
## PTSD     |       1 |   265 |          41.28
## PTSD     | missing |    20 |           3.12
model_obs <- "
htq_ptsd_total ~ ConflictTrauma + Isolation_Loss + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + ChildComViolence + q102b_guess_age

ConflictTrauma ~~  Isolation_Loss  + ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + ChildComViolence
Isolation_Loss ~~ ViolentVictimization + Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual + ChildComViolence
ViolentVictimization ~~ Destruction_Injury + WitnessViolence + ChildAbuse + ChildNeglectSexual
ViolentVictimization~~0*ChildComViolence
Destruction_Injury ~~ WitnessViolence + ChildAbuse + ChildComViolence
WitnessViolence ~~ ChildAbuse + ChildNeglectSexual + ChildComViolence
ChildAbuse ~~ 0*ChildNeglectSexual
ChildAbuse ~~ ChildComViolence
ChildNeglectSexual ~~ 0*ChildComViolence
ChildNeglectSexual ~~ 0*Destruction_Injury

ConflictTrauma ~ 0*1
Isolation_Loss ~ 0*1 
ViolentVictimization ~ 0*1 
Destruction_Injury ~ 0*1
WitnessViolence ~ 0*1
ChildAbuse ~0*1 
ChildNeglectSexual ~0*1 
ChildComViolence ~0*1 
"
fit_obs <- sem(model_obs, data = dataf,estimator = "ML", missing = "FIML.x", meanstructure = T, fixed.x = F)
summary(fit_obs, fit.measures = TRUE, standardized = TRUE, rsquare = T)

model_obs <- "
htq_ptsd_total ~ htq1_sum + ace_frequency
htq1_sum ~~ ace_frequency
"
fit_obs <- sem(model_obs, data = dataf,estimator = "ML", missing = "FIML.x", meanstructure = T, fixed.x = F)
summary(fit_obs, fit.measures = TRUE, standardized = TRUE, rsquare = T)